Last active
July 7, 2021 00:45
-
-
Save jmurphyau/0007870741e2163f91322e25402fd520 to your computer and use it in GitHub Desktop.
Powershell: Connect to MS Teams + Azure AD in one line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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