Is there a way not to show "Loading SQLPSX Module..."

Jul 9, 2010 at 3:23 PM
I'm executing Powershell script using EXEC master..XPCMDSHELL, but the output always shows a bunch of "Loading SQLPSX Module". Is there a way not to show it ? Thanks, Jimmy
Coordinator
Jul 9, 2010 at 5:24 PM

Sure, coment out the write-host lines in the Modules\SQLPSX\SQLPSX.psm1 file:

I may change the write-host to write-verbose or write-debug in a feature release so that the lines are emitted by default as is the case with Write-Host.

 Write-Host -BackgroundColor Black -ForegroundColor Yellow "$($MyInvocation.MyCommand.ScriptBlock.Module.name) removed on $(Get-Date)"

becomes

# Write-Host -BackgroundColor Black -ForegroundColor Yellow "$($MyInvocation.MyCommand.ScriptBlock.Module.name) removed on $(Get-Date)"

 

Jul 9, 2010 at 6:55 PM
Thank you so much. I really appreciate it. Jimmy