You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suppose I could make the cmdlet a little bit more tolerant and accept a SMO Database object (the type returned by Get-SqlDatabase) and not just SMO Server or string.
The "problem" is that today we are stuck with -ServerInstance being the argument from the pipeline... and changing that would be a breaking change for many people.
Perhaps, we could just keep the -ServerInstance name as it is and accept the database object as well. or something like that... it would be a bit (or a lot) confusing though...
Is it possible to do the below?
$Database = Get-SqlDatabase -ServerInstance $Server -Name $Name
$Database | Invoke-Sqlcmd -Query "Insert Into..."
The text was updated successfully, but these errors were encountered: