Remove-SPAllUsers

Deletes all Site Collection users. Will not delete site administrators.

Remove-SPAllUsers -Site <SPSitePipeBind>

Parameters

1

ParameterRequiredTypeDescription
SiteTrueSPSitePipeBind

Specifies the URL or GUID of the Site whose users will be deleted.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form http://server_name; or an instance of a valid SPSite object.

Detailed Description

Deletes all Site Collection users. Will not delete site administrators.

Copyright 2016 Falchion Consulting, LLC

> For more information on this cmdlet and others:

> http://blog.falchionconsulting.com/

> Use of this cmdlet is at your own risk.

> Gary Lapointe assumes no liability.

Examples

------------------EXAMPLE------------------

PS C:\> Remove-SPAllUsers -Site "http://demo"

This example removes all site users from the http://demo site.