Remove-CMAccessAccount

Removes users or groups from an access account.

Syntax

Remove-CMAccessAccount
      -AccountType <AccessAccountType>
      -ApplicationId <String>
      [-Confirm]
      [-DisableWildcardHandling]
      [-Force]
      [-ForceWildcardHandling]
      [-UserName <String>]
      [-WhatIf]
      [<CommonParameters>]
Remove-CMAccessAccount -AccountType  -ApplicationName  [-Confirm]
 [-DisableWildcardHandling] [-Force] [-ForceWildcardHandling] [-UserName ] [-WhatIf]
 []
Remove-CMAccessAccount -AccountType  -BootImageId  [-Confirm]
 [-DisableWildcardHandling] [-Force] [-ForceWildcardHandling] [-UserName ] [-WhatIf]
 []
Remove-CMAccessAccount -AccountType  -BootImageName  [-Confirm]
 [-DisableWildcardHandling] [-Force] [-ForceWildcardHandling] [-UserName ] [-WhatIf]
 []
Remove-CMAccessAccount -AccountType  [-Confirm] [-DisableWildcardHandling]
 -DriverPackageId  [-Force] [-ForceWildcardHandling] [-UserName ] [-WhatIf]
 []
Remove-CMAccessAccount -AccountType  [-Confirm] [-DisableWildcardHandling]
 -DriverPackageName  [-Force] [-ForceWildcardHandling] [-UserName ] [-WhatIf]
 []
Remove-CMAccessAccount [-InputObject]  -AccountType  [-Confirm]
 [-DisableWildcardHandling] [-Force] [-ForceWildcardHandling] [-UserName ] [-WhatIf]
 []
Remove-CMAccessAccount -AccountType  [-Confirm] [-DisableWildcardHandling] [-Force]
 [-ForceWildcardHandling] -OperatingSystemImageId  [-UserName ] [-WhatIf] []
Remove-CMAccessAccount -AccountType  [-Confirm] [-DisableWildcardHandling] [-Force]
 [-ForceWildcardHandling] -OperatingSystemImageName  [-UserName ] [-WhatIf]
 []
Remove-CMAccessAccount -AccountType  [-Confirm] [-DisableWildcardHandling] [-Force]
 [-ForceWildcardHandling] -OperatingSystemInstallerId  [-UserName ] [-WhatIf]
 []
Remove-CMAccessAccount -AccountType  [-Confirm] [-DisableWildcardHandling] [-Force]
 [-ForceWildcardHandling] -OperatingSystemInstallerName  [-UserName ] [-WhatIf]
 []
Remove-CMAccessAccount -AccountType  [-Confirm] [-DisableWildcardHandling] [-Force]
 [-ForceWildcardHandling] -PackageId  [-UserName ] [-WhatIf] []
Remove-CMAccessAccount -AccountType  [-Confirm] [-DisableWildcardHandling] [-Force]
 [-ForceWildcardHandling] -PackageName  [-UserName ] [-WhatIf] []
Remove-CMAccessAccount -AccountType  [-Confirm] [-DisableWildcardHandling] [-Force]
 [-ForceWildcardHandling] -SoftwareUpdateDeploymentPackageId  [-UserName ] [-WhatIf]
 []
Remove-CMAccessAccount -AccountType  [-Confirm] [-DisableWildcardHandling] [-Force]
 [-ForceWildcardHandling] -SoftwareUpdateDeploymentPackageName  [-UserName ] [-WhatIf]
 []

Description

The Remove-CMAccessAccount cmdlet removes users or groups from an access account.

An access account is a list of users or groups that can access an established service or application that is located on a distribution point. For example, members in the Software Update Point Connection Access Account can access two services to manage software updates: Windows Server Update Services (WSUS) and WSUS Synchronization Manager.

Examples

Example 1: Remove a user from an access account for an application by using its name

PS C:\> Remove-CMAccessAccount -ApplicationName "SharePoint 2010" -Type WindowsUser -UserName "CONTOSO\ENarvaez" -Confirm

This command removes a Windows user from the access account for an application that is specified by using its name. You must confirm the action before the command performs it.

Example 2: Remove a group from an access account for a package by using its ID

PS C:\> $ID = Get-CMAccessAccount -PackageId "CM1100002" 
PS C:\> Remove-CMAccessAccount -PackageId $ID -Type WindowsGroup -UserName "CONTOSO\Guest"

The first command gets the package object ID, and then stores it in the variable $ID.

The second command removes a group from the access account for the specified package. No confirmation is required.

Required Parameters

-AccountType

Specifies an account type. Valid values are: Guest, User, WindowsGroup, and WindowsUser.

Type:AccessAccountType
Parameter Sets:User, Guest, Administrator, WindowsUser, WindowsGroup
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ApplicationId

Specifies the ID of an application.

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

Specifies the name of an application.

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

Specifies the ID of a boot image.

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

Specifies the name of a boot image.

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

Specifies the ID of a driver package.

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

Specifies the name of a driver package.

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

Specifies the input to this cmdlet. You can use this parameter, or you can pipe the input to this cmdlet.

Type:IResultObject
Aliases:DriverPackage, Application, OperatingSystemImage, OperatingSystemInstaller, Package, SoftwareUpdateDeploymentPackage, BootImage
Required:True
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-OperatingSystemImageId

Specifies the ID of an operating system image.

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

Specifies the name of an operating system image.

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

Specifies the ID of an operating system installer.

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

Specifies the name of an operating system installer.

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

Specifies the ID of a deployed software script or program.

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

Specifies the name of a deployed software script or program.

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

Specifies the ID of a deployed software update.

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

Specifies the name of a deployed software update.

Type:String
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
-UserName

Specifies a Windows user account name in domain\user format.

Type:String
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