Hi ALl
I use this code to store my credentials through out the rest of my script this is working just fine.
$username = $env:USERNAME write-host "check if Credential file is available please wait......" if(!(Test-Path "c:\temp\cred\$username.Cred")){ $Credential = Get-Credential $Credential | Export-CliXml -Path "c:\temp\cred\$username.Cred" } Else { write-host "credentials found" }
however when I use connect-msolservice -credentials $credential I still get the popup to enter my username and password
when I use Connect-AzureAD -credentials $credential I don’t get the popup window to enter my username and password
PS C:\temp\powershell> Connect-AzureAD -Credential $credential Account Environment TenantId TenantDomain AccountType ------- ----------- -------- ------------ ----------- User.adm@mydomain.com AzureCloud mytenantid mydomain.com User
what do I need to do to make sure that the username and password are correctly handled when I connect to msolservice so that I don’t get the popup screen
thanks for your assistance
Paul