Add variable when use Write-DbaDataTable for write it in every row #7809
Unanswered
acappelletti
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Frankly I can't understand what you're trying to achieve .... I think your problems comes from the fact that you'd need something BEFORE the pipe to Write-DbaDataTable, look at https://devblogs.microsoft.com/scripting/learn-how-to-create-custom-column-heads-for-powershell-out-gridview/ . That case is for Out-GridView, yours is for Write-DbaDataTable, but the solution may very well be the same (adding a "current time" column to your dataset) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
it's possible add a variable like the one below when I get the picture of system?
I could insert a trigger DB side... bur I would like to use it during the insert with Write-DbaDataTable or I need befor other kind of piping... like | SELECT *, $Time | Write-DbaDataTable
I tried but had errors...
Thanks Alen
$Time = Get-Date
Get-DbaFeature -ComputerName DB-01 | Write-DbaDataTable -SqlInstance DB-REPO -Database DBAEstate -Table dbo.Feature -AutoCreateTable
Beta Was this translation helpful? Give feedback.
All reactions