I'm trying to capture the verbose output from the Invoke-Sqlcmd in Powershell. Anyone got any ideas to do this:
i.e.
Invoke-Sqlcmd -Query "PRINT 'Hello World!';" -ServerInstance $Server -verbose > D:SqlLog.txt
The SqlLog.txt file should contain the text "Hello World!"
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…