Forum Discussion

bala_bron's avatar
bala_bron
Copper Contributor
Jan 19, 2023

Suppress Credential popup while exchage cmdlet execution.

I use

$cred = get-credential  (enters credentials)

connect-exchangeonline -Credential $cred

after this powershell asks me login in pop up when the account is improper or has MFA. is there a way to block the credential popup and just show the error message. and this also occurs if we execute a cmdlet for an active session in which the user's account's credential has been changed in between. 

 

Also the error message is not in the error stream. actual error is displayed like info.

 

  • That happens because the module tries to re-establish the connection. You'll have to edit the module binaries to get rid of it.
    • bala_bron's avatar
      bala_bron
      Copper Contributor
      Hi, is there any ways or resources available to edit the binaries ?

Resources