Several members of our IT team need to regularly connect to multiple Azure Government environments via PowerShell. We usually run this script.
Connect-AzureAD -AzureEnvironmentName AzureUSGovernment
Connect-ExchangeOnline -ExchangeEnvironmentName O365USGovGCCHigh
Connect-MsolService -AzureEnvironment AzureUSGovernmentCloud
However the script requires us to enter our admin credentials multiple times. How can I prompt for username and password at the beginning of the script then pass those credentials through the rest of the script? Thanks.