Add-AzGalleryInVMAccessControlProfileVersionRulesRole
Lägger till en regelroll i ett PSGalleryInVmAccessControlProfileVersion-objekt.
Syntax
Default (Standard)
Add-AzGalleryInVMAccessControlProfileVersionRulesRole
-GalleryInVmAccessControlProfileVersion <PSGalleryInVMAccessControlProfileVersion>
-RoleName <String>
-Privilege <String[]>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Cmdleten Add-AzGalleryInVMAccessControlProfileVersionRulesRole lägger till en regelroll till det angivna PSGalleryInVmAccessControlProfileVersion-objektet.
Exempel
Exempel 1
$inVMAccessControlProfileVersion = New-AzGalleryInVMAccessControlProfileVersionConfig -Name "myProfileVersion" -Location "West US 2" -Mode "Audit" -DefaultAccess "Deny" -TargetLocation @("West US 2")
Add-AzGalleryInVMAccessControlProfileVersionRulesRole -GalleryInVmAccessControlProfileVersion $inVMAccessControlProfileVersion -RoleName "Provisioning" -Privilege @("GoalState")
Add-AzGalleryInVMAccessControlProfileVersionRulesRole -GalleryInVmAccessControlProfileVersion $inVMAccessControlProfileVersion -RoleName "Provisioning2" -Privilege @("GoalState")
Skapar ett lokalt PSGalleryInVMAccessControlProfileVersion-objekt och lägger sedan till två regelroller.
Parametrar
-DefaultProfile
Autentiseringsuppgifter, konto, klientorganisation och prenumeration som används för kommunikation med Azure.
Parameteregenskaper
| Typ: | IAzureContextContainer |
| Standardvärde: | None |
| Stöder jokertecken: | False |
| DontShow: | False |
| Alias: | AzContext, AzureRmContext, AzureCredential |
Parameteruppsättningar
(All)
| Position: | Named |
| Obligatorisk: | False |
| Värde från pipeline: | False |
| Värde från pipeline efter egenskapsnamn: | False |
| Värde från återstående argument: | False |
-GalleryInVmAccessControlProfileVersion
PSGalleryInVmAccessControlProfileVersion-objekt som skapats från New-AzGalleryInVMAccessControlProfileVersionConfig.
Parameteregenskaper
| Typ: | PSGalleryInVMAccessControlProfileVersion |
| Standardvärde: | None |
| Stöder jokertecken: | False |
| DontShow: | False |
Parameteruppsättningar
(All)
| Position: | Named |
| Obligatorisk: | True |
| Värde från pipeline: | True |
| Värde från pipeline efter egenskapsnamn: | False |
| Värde från återstående argument: | False |
-Privilege
En lista över behörigheter som krävs av den här rollen.
Parameteregenskaper
| Typ: | String[] |
| Standardvärde: | None |
| Stöder jokertecken: | False |
| DontShow: | False |
Parameteruppsättningar
(All)
| Position: | Named |
| Obligatorisk: | True |
| Värde från pipeline: | False |
| Värde från pipeline efter egenskapsnamn: | True |
| Värde från återstående argument: | False |
-RoleName
Namnet på rollen.
Parameteregenskaper
| Typ: | String |
| Standardvärde: | None |
| Stöder jokertecken: | False |
| DontShow: | False |
| Alias: | Namn |
Parameteruppsättningar
(All)
| Position: | Named |
| Obligatorisk: | True |
| Värde från pipeline: | False |
| Värde från pipeline efter egenskapsnamn: | True |
| Värde från återstående argument: | False |
CommonParameters
Den här cmdleten stöder vanliga parametrar: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction och -WarningVariable. Mer information finns i about_CommonParameters.