Closed moiaune closed 3 years ago
Hi @madsaune,
I think output suppression logic shouldn't be in Export-AzViz
and if you need to suppress Write-Host output simply use stream redirection as shown in the following example:
Export-AzViz -ResourceGroup myresourcegroupname -Theme neon -Show 6>&1 | Out-Null
Since PowerShell v5.1, Write-Host
cmdlet now sends the output to Information stream (6)
instead of directly sending it to the console, and hence it can be redirected and suppressed using 6>&1 | Out-Null
Thanks, I didn't know that! 🙂
Hi,
First of all, thanks so much for this module. Its golden!
I'm automating visualization of Azure environment using AzViz in a script which generates a visualization for each subscription which in turn means that I must call
Export-AzViz
multiple times, since I have multiple subscriptions.The current version of AzViz generates a lot of output in the terminal, so it would be nice if we could have a parameter that would supress this information. I've tried to pipe the command to
Out-Null
but since it's usingWrite-Host
this does not work.