MSCloudLoginAssistant icon indicating copy to clipboard operation
MSCloudLoginAssistant copied to clipboard

Improve Logging by removing '$VerbosePreference = 'SilentlyContinue'' Connect-M365Tenant

Open SebastianGoers opened this issue 3 years ago • 2 comments

Is there a chance $VerbosePreference = 'SilentlyContinue' can be removed in Connect-M365Tenant https://github.com/microsoft/MSCloudLoginAssistant/blob/79054795d8586191335cd8498c3d45ef5d2bdc91/Modules/MSCloudLoginAssistant/MSCloudLoginAssistant.psm1#L146 as it would make debugging connections in other workloads such as Microsoft365DSC much easier?

It kind of contradicts the fact that all output in the script is being produced by write-verbose.

SebastianGoers avatar Jan 26 '22 13:01 SebastianGoers

I ran into this today while troubleshooting an issue with M365DSC and spent a while figuring out why all those Write-Verbose lines exist, if they are not displayed anyway. :) Should I offer a PR for this? An optional parameter?

apcsb avatar Jul 19 '23 23:07 apcsb

Discussed in https://github.com/microsoft/Microsoft365DSC/issues/4982, should be resolved under https://github.com/microsoft/MSCloudLoginAssistant/pull/188

Borgquite avatar Dec 17 '24 11:12 Borgquite