Remove-SCSMRunAsAccount

Removes a RunAs account.

Syntax

Remove-SCSMRunAsAccount
      [-RunAsAccount] <UserAccount[]>
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-SCSMRunAsAccount cmdlet removes a RunAs account.

Examples

Example 1: Remove RunAs accounts by name

PS C:\>Get-SCSMRunAsAccount | Where-Object {$_.UserName -eq "Administrator"}|Remove-SCSMRunAsAccount

This command removes all RunAs accounts in which the user name is "Administrator". Note that this may cause certain workflows and other operations to fail.

Required Parameters

-RunAsAccount

Specifies the RunAs account to be removed. Input to this parameter can be a ManagementPackSecureReference object or a UserAccount object that, for example, you can obtain from the Get-SCSMRunAsAccount cmdlet.

Type:UserAccount[]
Position:1
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
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
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.EnterpriseManagement.Core.SdkUtilities.Security.UserAccount

You can pipe a RunAsAccount object to the RunAsAccount parameter of the Remove-SCSMRunAsAccount cmdlet, for example, the object that is retrieved by the Get-SCRunAsAccount cmdlet.

Outputs

None.

This cmdlet does not generate any output.