Remove-SCSMRunAsAccount
拿掉 RunAs 帳戶。
語法
Remove-SCSMRunAsAccount
[-RunAsAccount] <UserAccount[]>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Remove-SCSMRunAsAccount Cmdlet 會移除 RunAs 帳戶。
範例
範例 1:依名稱移除 RunAs 帳戶
PS C:\>Get-SCSMRunAsAccount | Where-Object {$_.UserName -eq "Administrator"}|Remove-SCSMRunAsAccount
此命令會移除使用者名稱為 「Administrator」 的所有 RunAs 帳戶。 請注意,這可能會導致某些工作流程和其他作業失敗。
參數
-Confirm
在執行 Cmdlet 之前,提示您進行確認。
類型: | System.Management.Automation.SwitchParameter |
別名: | cf |
Position: | Named |
預設值: | False |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-RunAsAccount
指定要移除的 RunAs 帳戶。
此參數的輸入可以是
類型: | Microsoft.EnterpriseManagement.Core.SdkUtilities.Security.UserAccount[] |
Position: | 1 |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-WhatIf
顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。
類型: | System.Management.Automation.SwitchParameter |
別名: | wi |
Position: | Named |
預設值: | False |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
輸入
Microsoft.EnterpriseManagement.Core.SdkUtilities.Security.UserAccount
例如,您可以使用管線將 runAsAccount 物件
輸出
None.
此 Cmdlet 不會產生任何輸出。