Remove-CMAdministrativeUser

Removes an administrative user.

Syntax

Remove-CMAdministrativeUser
      [-Confirm]
      [-DisableWildcardHandling]
      [-Force]
      [-ForceWildcardHandling]
      -Id <String>
      [-RoleName <String[]>]
      [-WhatIf]
      [<CommonParameters>]
Remove-CMAdministrativeUser [-Confirm] [-DisableWildcardHandling] [-Force] [-ForceWildcardHandling]
 -InputObject  [-WhatIf] []
Remove-CMAdministrativeUser [-Confirm] [-DisableWildcardHandling] [-Force] [-ForceWildcardHandling]
 -Name  [-RoleName ] [-WhatIf] []

Description

The Remove-CMAdministrativeUser cmdlet removes one or more Microsoft System Center Configuration Manager administrative users. When you remove an administrative user, Configuration Manager revokes the access of the administrative user to manage Configuration Manager.

Examples

Example 1: SearchByValueMandatory, pipeline

PS C:\> Get-CMAdministrativeUser -Name contoso\admin1 -RoleName "Application Administrator" | Remove-CMAdministrativeUser -Force

This command gets the administrative user object named AdminUser1 who is a member of the Application Administrator role and uses the pipeline operator to pass the object to Remove-CMAdministrativeUser, which removes the adminsitrative user. Specifying the Force parameter indicates that the user is not prompted for confirmation prior to the user being removed.

Example 2: SearchByName

PS C:\> Remove-CMAdministrativeUser -Name contoso\admin1 -RoleName "Application Administrator" -Force

This command removes the administrative user named AdminUser1 who is a member of the Application Administrator role. Specifying the Force parameter indicates that the user is not prompted for confirmation prior to the user being removed.

Required Parameters

-Id

Specifies the ID of an administrative user.

Type:String
Aliases:AdminId
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

Specifies an administrative user object. To obtain an administrative user object, use the Get-CMAdministrativeUser cmdlet.

Type:IResultObject
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Name

Specifies an array of administrative user names in the format of <domain>\<user>.

Type:String
Aliases:DisplayName, LogonName, UserName
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-DisableWildcardHandling

Indicates that wildcard handling is disabled.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

Indicates that wildcard handling is enabled.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RoleName

Specifies an array of names of security roles. Valid values are: - Application Administrator

  • Application Author
  • Application Deployment Manager
  • Asset Manager
  • Compliance Settings Manager
  • Discovery Operator
  • Endpoint Protection Manager
  • Full Administrator
  • Infrastructure Administrator
  • Operating System Deployment Manager
  • Operations Administrator
  • Read-only Analyst
  • Remote Tools Operator
  • Security Administrator
  • Software Update Manager
  • Custom-defined security roles
Type:String[]
Aliases:RoleNames
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False