Remove-SCSMRunAsAccount

Remove-SCSMRunAsAccount

Removes a RunAs account.

Syntax

Parameter Set: Default
Remove-SCSMRunAsAccount [-RunAsAccount] <UserAccount[]> [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Remove-SCSMRunAsAccount cmdlet removes a RunAs account.

Parameters

-RunAsAccount<UserAccount[]>

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.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

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.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • 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

The output type is the type of the objects that the cmdlet emits.

  • None.

    This cmdlet does not generate any output.

Examples

-------------------------- EXAMPLE 1 --------------------------

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

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

Get-SCSMRunAsAccount

New-SCSMRunAsAccount

Update-SCSMRunAsAccount