How to Block a user account via Office 365 PowerShell

I have many Office 365 customers and few of them are actually small or don’t have Active Directory. Basically, they have cloud only account in Azure Active Directory and I am asked how to block a user from PowerShell.

Blocked Office 365 account.

It is actually easy, all you need to run below command

Set-MsolUser -UserPrincipalName sonat@cloudtolearn.com -BlockCredential $true

Save

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: