Friday, May 19, 2017

How to run power shell commands against Skype Online if MFA is enabled

Start Power Shell on you local computer





You must have version 3 or higher. To check your version, enter this cmdlet:
Get-Host


You can download a newer version here : https://www.microsoft.com/en-us/download/details.aspx?id=50395


You also need Skype for Business Online, Windows PowerShell Module. To check if you have Skype for Business module, enter this cmdlet:


Get-Module -ListAvailable -Name SkypeOnlineConnector





If there is no result listed, you can download the module her: https://www.microsoft.com/en-us/download/details.aspx?id=39366


If your admin account use MFA, you need to set the app password. If not, you can jump down to the last section and then type your admin password instead.


Log in with your admin account and then set the AppPassword

Click on the "Create" button

Enter "something" and then click on "Next"

Remember this AppPassword

Switch back to your PowerShell windows, and then enter the following cmdlets:
Import-Module SkypeOnlineConnector

$cred = Get-Credential

$SfBSession = New-CsOnlineSession -Credential $cred

Import-PSSession $SfBSession -AllowClobber

Type your AppPassword in this box.


Then you can run commands against Skype Online e.g






No comments:

Post a Comment