Skip to content

Instantly share code, notes, and snippets.

@jmurphyau
Last active July 7, 2021 00:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmurphyau/0007870741e2163f91322e25402fd520 to your computer and use it in GitHub Desktop.
Save jmurphyau/0007870741e2163f91322e25402fd520 to your computer and use it in GitHub Desktop.
Powershell: Connect to MS Teams + Azure AD in one line
# works on mac and pc, prompts in terminal for both
$u=(read-host 'User'); $p=(read-host 'Password' -assecurestring); $cred=New-Object System.Management.Automation.PSCredential ($u, $p); Connect-MicrosoftTeams -Credential $cred; Connect-MsolService -Credential $cred;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment