Many sub modules with .Autorest: Remove the use of write-information for module load message #24855
Labels
Azure PS Team
customer-reported
feature-request
This issue requires a new behavior in the product in order be resolved.
Tracking
We will track status and follow internally
Description
Seems like all modules have a *.Autorest*.psm1 file (where * is sub module name) that contains the following code:
Write-Information "Loaded Module '$($accountsModule.Name)'"
For us that use the information stream for logging we get unwanted pollution of the info stream from these messages, and makes us have to use -InformationVariable infoVar on almost everything to be able to scrub the stream output:
We use alot of ForEeach-Object -Parallel with calls to Az inside, and as this loads Az modules for each, there is a lot of pollution of the information stream from the use of Write-Information for the module load message in Az.
Please instead use, as this is often by default silenced with $VerbosePreference = "SilentlyContinue":
Write-Verbose -Message "Loaded Module '$($accountsModule.Name)'"
This is especially anoying in Azure DevOps, where the AzurePowershell task uses $InformationPreference = "Continue"
The most problematic is Az.Resources as we use this all over the place.
Issue script & Debug output
Environment data
Module versions
Error output
The text was updated successfully, but these errors were encountered: