July 27th, 2016

PowerTip: Use PowerShell to remove a user from all site collections in SharePoint Online

Doctor Scripto
Scripter

Summary: Learn how to use PowerShell to remove a corporate user from all site collections in SharePoint Online.

Hey, Scripting Guy! Question How can I use Windows PowerShell to quickly remove a corporate user from all site collections in SharePoint Online?

Hey, Scripting Guy! Answer Use the following commands (change the login user name as required):

Get-SPOSite | ForEach-object{Remove-SPOUser -Site $_.Url -LoginName kmyer@contoso.com}

The Doctor

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.

Feedback