Remove-SCRunAsAccount
Removes a RunAs account.
Syntax
Default (Default)
Remove-SCRunAsAccount
[-RunAsAccount] <UserAccount[]>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Remove-SCRunAsAccount cmdlet removes a RunAs account.
Examples
Example 1: Remove RunAs accounts by name
PS C:\>Get-SCRunAsAccount | Where-Object {$_.UserName -eq "Administrator"}|Remove-SCRunAsAccount
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.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: | System.Management.Automation.SwitchParameter |
Default value: | False |
Supports wildcards: | False |
DontShow: | False |
Aliases: | cf |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-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-SCRunAsAccount cmdlet.
Parameter properties
Type: | Microsoft.EnterpriseManagement.Core.SdkUtilities.Security.UserAccount[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 1 |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
Type: | System.Management.Automation.SwitchParameter |
Default value: | False |
Supports wildcards: | False |
DontShow: | False |
Aliases: | wi |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
Microsoft.EnterpriseManagement.Core.SdkUtilities.Security.UserAccount
You can pipe a RunAsAccount object to the RunAsAccount parameter of the Remove-SCRunAsAccount cmdlet, for example, the object that is retrieved by the Get-SCRunAsAccount cmdlet.
Outputs
None.
This cmdlet does not generate any output.