I have used below command to initiates a connection to Azure Active Directory in Power Shell.


I have completed required operations, But how do I disconnect? Do I wait till session expiry?!

enter image description here


Just close the window.

As for your connection to Office 365, although there’s a Connect-MsolService cmdlet, there’s no corresponding Disconnect-MsolService cmdlet. So for Office 365, just close the Windows PowerShell window. (Nevertheless, it’s still a good idea to do this last so you can properly disconnect from SharePoint Online, Skype for Business Online, Exchange Online, and the Security & Compliance Center.)


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.