Remove-SPUser

Remove um usuário de um site.

Syntax

Remove-SPUser
      [-Identity] <SPUserPipeBind>
      -Web <SPWebPipeBind>
      [-AssignmentCollection <SPAssignmentCollection>]
      [-Confirm]
      [-Group <SPGroupPipeBind>]
      [-WhatIf]
      [<CommonParameters>]

Description

O Remove-SPUser cmdlet especifica a identidade e o grupo de usuários do qual um usuário deve ser removido. O Remove-SPUser cmdlet não remove o usuário do Active Directory Domain Services (AD DS).

Para obter as permissões e informações mais recentes sobre o Windows PowerShell para Produtos SharePoint, confira a documentação online em Cmdlets do SharePoint Server.

Exemplos

------------------EXEMPLO 1-----------------------

Remove-SPUser "Contoso\jdoe" -web https://test/web1
Get-SPWeb "https://test/web1" | Remove-SPUser "Contoso\jdoe"

Este exemplo remove o usuário (Contoso\jdoe) do aplicativo Web https://test/web1.

------------------EXEMPLO 2-----------------------

Get-SPSite https://contoso.com |Get-SPWeb |Remove-SPUser "Contoso\jdoe"

Esta sintaxe remove o usuário (Contoso\Jdoe) de toda a Web em um conjunto de sites localizado em https://contoso.com.

Parâmetros

-AssignmentCollection

Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.

When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type:SPAssignmentCollection
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Confirm

Solicita sua confirmação antes de executar o comando. Para saber mais, digite o seguinte comando: get-help about_commonparameters

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Grupo

O usuário é removido apenas desse grupo. Caso contrário, ele é removido do site.

Type:SPGroupPipeBind
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Identidade

Especifica o GUID, o nome de usuário ou o objeto SPUser a ser removido.

O tipo deve ser um GUID válido do usuário, no formato 1234-5678-9876-0987.

Type:SPUserPipeBind
Aliases:UserAlias
Position:1
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Web

Specifies the name of the URL or GUID from which the user is to be removed. This parameter is needed only if the identity provided is the user name.

O tipo deve ser uma URL válida, no formato https://server_name; ou um GUID, no formato 1234-5678-9807.

Type:SPWebPipeBind
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-WhatIf

Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition