When I run the script below, in a non-elevated powershell window, it prompts for password on the first line, as it should, but then continues to prompt again for the other four service connect logins. When I run the same commands in an elevated window (right-click and Run as Admin), then it works, prompting only for the first and then connecting to the others using $cred. Can I make this work somehow in a non-elevated window?
if($cred -eq $null){$cred = Get-Credential myemail@something.com}
Connect-MsolService -credential $cred
Connect-AzureAD -credential $cred
Connect-Microsoftteams -credential $cred
Connect-ExchangeOnline -credential $cred