Add-AzGalleryInVMAccessControlProfileVersionRulesPrivilege

Lägger till en regelprivilegier till ett PSGalleryInVmAccessControlProfileVersion-objekt.

Syntax

Default (Standard)

Add-AzGalleryInVMAccessControlProfileVersionRulesPrivilege

    -GalleryInVmAccessControlProfileVersion <PSGalleryInVMAccessControlProfileVersion>
    -PrivilegeName <String>
    -Path <String>
    [-QueryParameter <Hashtable>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

Cmdleten Add-AzGalleryInVMAccessControlProfileVersionRulesPrivilege lägger till en regelprivilegier 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-AzGalleryInVMAccessControlProfileVersionRulesPrivilege -GalleryInVmAccessControlProfileVersion $inVMAccessControlProfileVersion -PrivilegeName "GoalState" -Path "/machine" -QueryParameter @{ comp = "goalstate" }
Add-AzGalleryInVMAccessControlProfileVersionRulesPrivilege -GalleryInVmAccessControlProfileVersion $inVMAccessControlProfileVersion -PrivilegeName "GoalState2" -Path "/machine" -QueryParameter @{ comp = "goalstate" }

Skapar ett lokalt PSGalleryInVMAccessControlProfileVersion-objekt och lägger sedan till två regelprivilegier.

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

-Path

HTTP-sökvägen som motsvarar behörigheten.

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

-PrivilegeName

Namnet på privilegiet.

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

-QueryParameter

Frågeparametrarna som ska matchas i sökvägen.

Parameteregenskaper

Typ:Hashtable
Standardvärde:None
Stöder jokertecken:False
DontShow:False

Parameteruppsättningar

(All)
Position:Named
Obligatorisk:False
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.

Indata

PSGalleryInVMAccessControlProfileVersion

String

Hashtable

Utdata

PSGalleryInVMAccessControlProfileVersion