How to Delete a User from Your SharePoint Site Collection

Jonathan Browne
By | Updated November 17, 2017 | 3 min read
remote project team

A common question that we are asked is “How do I remove users from my BrightWork site collection?” And more specifically the “My Work” user drop downs.

It’s quite common for SharePoint administrators to synchronize their Active Directory with the BrightWork Site collection. This is a bad procedure for two reasons.

  1. Your “My Work” user choice menus will be flooded with users which bare no relevance and this causes delays navigating for those who use the site.
  2. You have probably broken the limit of user licenses that you have purchased in your BrightWork license agreement, although they many of the names listed are not using BrightWork.

 

Removing users from a site collection is a very simple task. This blog outlines how to delete a user from a SharePoint site collection.

 

List Permission*Warning: This does remove this SharePoint entry from the entire site collection.

Use with care.

 

Remove User from a Site Collection:

  1. Firstly you must be logged on with site collection admin rights.
  2. Ensure that you are at the root (top level) of your site collection.
  3. You want to remove the /default.aspx from your URL i.e. https://2016.brightworkdemo.com/sites/cmccarthy/default.aspx becomes https://2016.brightworkdemo.com/sites/cmccarthy
  4. Now add the following hidden view portion to the URL…     _layouts/people.aspx?MembershipGroupId=0 which leaves you with a complete URL: https://2016.brightworkdemo.com/sites/cmccarthy/_layouts/people.aspx?MembershipGroupId=0
  5. Hit Enter. You will now see the hidden view and the list of all users in the site collection.
  6. Click on the username(s) of the user you want to remove.
  7. Under Actionsclick Delete User from Site Collection.  Delete User from Site Collection
  8. Click OK on the warning message, and the user will now be gone from the site collection, freeing you up a BrightWork license!

 

Delete User with PowerShell

Do you want to use PowerShell instead? You can adjust the script below, entering your site collection name and the user account names.

Add-PSSnapin microsoft.sharepoint.powershell -ea continue
$site = Get-SPSite “https://[SiteCollectionName]”

$web = $site.RootWeb
$list = $web.Lists[“User Information List”]

$i = $list.Items | where {$_[“Account”] -eq “<UserAccountName>”}
$i.Delete()

$web.Dispose()
$site.Dispose()

Would you like to do more housekeeping and maintenance? Check out how you Change a SharePoint User Display Name with PowerShell

(Original article dated 18 Jan 2013, update for SharePoint 2013 and 2016)

 

 

Image credit

 

Jonathan Browne
Jonathan Browne

Don't forget to share this post!