Remove-AzGalleryInVMAccessControlProfileVersionRulesIdentity
從 PSGalleryInVmAccessControlProfileVersion 物件移除規則身分識別。
語法
Default (預設值)
Remove-AzGalleryInVMAccessControlProfileVersionRulesIdentity
-GalleryInVmAccessControlProfileVersion <PSGalleryInVMAccessControlProfileVersion>
-IdentityName <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Remove-AzGalleryInVMAccessControlProfileVersionRulesIdentity Cmdlet 會根據指定的身分識別名稱,從提供的 PSGalleryInVmAccessControlProfileVersion 物件中移除規則身分識別。
範例
範例 1
$inVMAccessControlProfileVersion = New-AzGalleryInVMAccessControlProfileVersionConfig -Name "myProfileVersion" -Location "West US 2" -Mode "Audit" -DefaultAccess "Deny" -TargetLocation @("West US 2")
Add-AzGalleryInVMAccessControlProfileVersionRulesIdentity -GalleryInVmAccessControlProfileVersion $inVMAccessControlProfileVersion -IdentityName "WinPA" -UserName "SYSTEM" -GroupName "Administrators" -ExePath "C:\Windows\System32\cscript.exe" -ProcessName "cscript"
Add-AzGalleryInVMAccessControlProfileVersionRulesIdentity -GalleryInVmAccessControlProfileVersion $inVMAccessControlProfileVersion -IdentityName "WinPA2" -UserName "SYSTEM" -GroupName "Administrators" -ExePath "C:\Windows\System32\cscript.exe" -ProcessName "cscript"
Remove-AzGalleryInVMAccessControlProfileVersionRulesIdentity -GalleryInVmAccessControlProfileVersion $inVMAccessControlProfileVersion -IdentityName "WinPA2"
建立本機 PSGalleryInVMAccessControlProfileVersion 物件、新增兩個規則身分識別,然後移除名稱為 「WinPA2」 的身分識別。
參數
-DefaultProfile
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
參數屬性
| 類型: | IAzureContextContainer |
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
| 別名: | AzContext, AzureRmContext, AzureCredential |
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-GalleryInVmAccessControlProfileVersion
PSGalleryInVmAccessControlProfileVersion 從 New-AzGalleryInVMAccessControlProfileVersionConfig 建立的物件。
參數屬性
| 類型: | PSGalleryInVMAccessControlProfileVersion |
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
(All)
| Position: | Named |
| 必要: | True |
| 來自管線的值: | True |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-IdentityName
身分識別的名稱。
參數屬性
| 類型: | String |
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
| 別名: | 名稱 |
參數集
(All)
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
CommonParameters
此 Cmdlet 支援常見參數:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters。