Instead of exposing information via $Global, we should be placing sensitive information in the sessionState.
https://docs.microsoft.com/en-us/dotnet/api/system.management.automation.sessionstate
current
Set-Variable -Name azDevOpsHeader -Value $azDevOpsHeader -Scope Global
proposed
$PSCmdlet.SessionState.PSVariable.Set('azDevOpsHeader',$azDevOpsHeader)
There is potential to set scope on these to make them private so they are only accessible within the module.
Instead of exposing information via $Global, we should be placing sensitive information in the sessionState.
https://docs.microsoft.com/en-us/dotnet/api/system.management.automation.sessionstate
current
proposed
There is potential to set scope on these to make them private so they are only accessible within the module.