Udostępnij przez


Remove-AzGalleryInVMAccessControlProfileVersionRulesRoleAssignment

Usuwa przypisanie roli reguł z obiektu PSGalleryInVmAccessControlProfileVersion.

Składnia

Default (Domyślne)

Remove-AzGalleryInVMAccessControlProfileVersionRulesRoleAssignment

    -GalleryInVmAccessControlProfileVersion <PSGalleryInVMAccessControlProfileVersion>
    -Role <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Opis

Polecenie cmdlet Remove-AzGalleryInVMAccessControlProfileVersionRulesRoleAssignment usuwa przypisanie roli reguł z podanego obiektu PSGalleryInVmAccessControlProfileVersion na podstawie roli.

Przykłady

Przykład 1

$inVMAccessControlProfileVersion  = New-AzGalleryInVMAccessControlProfileVersionConfig -Name "myProfileVersion" -Location "West US 2" -Mode "Audit" -DefaultAccess "Deny" -TargetLocation @("West US 2")

Add-AzGalleryInVMAccessControlProfileVersionRulesRoleAssignment -GalleryInVmAccessControlProfileVersion $inVMAccessControlProfileVersion -Role "Provisioning" -Identity @("WinPA")
Add-AzGalleryInVMAccessControlProfileVersionRulesRoleAssignment -GalleryInVmAccessControlProfileVersion $inVMAccessControlProfileVersion -Role "Provisioning2" -Identity @("WinPA")

Remove-AzGalleryInVMAccessControlProfileVersionRulesRoleAssignment -GalleryInVmAccessControlProfileVersion $inVMAccessControlProfileVersion -Role "Provisioning2"

Tworzy lokalny obiekt PSGalleryInVMAccessControlProfileVersion, dodaj dwa przypisania roli reguły, a następnie usuń przypisanie roli o nazwie "Provisioning2".

Parametry

-DefaultProfile

Poświadczenia, konto, dzierżawa i subskrypcja używane do komunikacji z platformą Azure.

Właściwości parametrów

Typ:IAzureContextContainer
Wartość domyślna:None
Wspiera dzikie karty:False
DontShow:False
Aliasy:AzContext, AzureRmContext, AzureCredential

Zbiory parametrów

(All)
Pozycja:Named
Obowiązkowy:False
Wartość z pipeline:False
Wartość z pipeline według nazwy właściwości:False
Wartość pozostałych argumentów:False

-GalleryInVmAccessControlProfileVersion

PSGalleryInVmAccessControlProfileVersion obiekt utworzony na podstawie polecenia New-AzGalleryInVMAccessControlProfileVersionConfig.

Właściwości parametrów

Typ:PSGalleryInVMAccessControlProfileVersion
Wartość domyślna:None
Wspiera dzikie karty:False
DontShow:False

Zbiory parametrów

(All)
Pozycja:Named
Obowiązkowy:True
Wartość z pipeline:True
Wartość z pipeline według nazwy właściwości:False
Wartość pozostałych argumentów:False

-Role

Nazwa roli.

Właściwości parametrów

Typ:String
Wartość domyślna:None
Wspiera dzikie karty:False
DontShow:False

Zbiory parametrów

(All)
Pozycja:Named
Obowiązkowy:True
Wartość z pipeline:False
Wartość z pipeline według nazwy właściwości:True
Wartość pozostałych argumentów:False

CommonParameters

To polecenie cmdlet obsługuje typowe parametry: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction i -WarningVariable. Aby uzyskać więcej informacji, zobacz about_CommonParameters.

Wejścia

PSGalleryInVMAccessControlProfileVersion

String

Wyjść

PSGalleryInVMAccessControlProfileVersion