Remove-CMAdministrativeUser

Remove an administrative user.

Syntax

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

Description

Use this cmdlet to remove a Configuration Manager administrative user. An administrative user in Configuration Manager defines a local or domain user or group. When you remove an administrative user, Configuration Manager revokes the access of the administrative user to manage Configuration Manager. For more information about security roles, see Fundamentals of role-based administration in Configuration Manager.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

Example 1: Remove a user

This command gets the administrative user object named Admin1. It uses the pipeline operator to pass the object to Remove-CMAdministrativeUser, which removes the administrative user. With the Force parameter, you're not prompted for confirmation before it runs.

Get-CMAdministrativeUser -Name "contoso\admin1" | Remove-CMAdministrativeUser -Force

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

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

-Force

Forces the command to run without asking for user confirmation.

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

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

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

-Id

Specify the ID of the administrative user to remove. This value is the AdminID property. It's an integer value, for example 16777234.

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

-InputObject

Specify an administrative user object to remove. To get this object, use the Get-CMAdministrativeUser cmdlet.

Type:IResultObject
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

Specify the name of the administrative user to remove. For example, domain\username or domain\groupname

You can use wildcard characters:

  • *: Multiple characters
  • ?: Single character
Type:String
Aliases:DisplayName, LogonName, UserName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:True

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet doesn't run.

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

Inputs

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

Outputs

System.Object