Freigeben über


Remove-AzGalleryInVMAccessControlProfileVersionRulesRole

Entfernt eine Regelrolle aus einem PSGalleryInVmAccessControlProfileVersion -Objekt.

Syntax

Default (Standard)

Remove-AzGalleryInVMAccessControlProfileVersionRulesRole

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

Beschreibung

Das Cmdlet Remove-AzGalleryInVMAccessControlProfileVersionRulesRole entfernt eine Regelrolle aus dem bereitgestellten PSGalleryInVmAccessControlProfileVersion -Objekt basierend auf dem Rollennamen.

Beispiele

Beispiel 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")

Remove-AzGalleryInVMAccessControlProfileVersionRulesRole -GalleryInVmAccessControlProfileVersion $inVMAccessControlProfileVersion -RoleName "Provisioning2"

Erstellt ein lokales PSGalleryInVMAccessControlProfileVersion -Objekt, fügen Sie zwei Regelrollen hinzu, und entfernen Sie dann die Rolle mit dem Namen "Provisioning2".

Parameter

-DefaultProfile

Anmeldeinformationen, Konto, Mandant und Abonnement für die Kommunikation mit Azure

Parametereigenschaften

Typ:IAzureContextContainer
Standardwert:None
Unterstützt Platzhalter:False
Nicht anzeigen:False
Aliase:AzContext, AzureRmContext, AzureCredential

Parametersätze

(All)
Position:Named
Obligatorisch:False
Wert aus Pipeline:False
Wert aus Pipeline nach dem Eigenschaftsnamen:False
Wert aus verbleibenden Argumenten:False

-GalleryInVmAccessControlProfileVersion

PsGalleryInVmAccessControlProfileVersion-Objekt erstellt aus New-AzGalleryInVMAccessControlProfileVersionConfig.

Parametereigenschaften

Typ:PSGalleryInVMAccessControlProfileVersion
Standardwert:None
Unterstützt Platzhalter:False
Nicht anzeigen:False

Parametersätze

(All)
Position:Named
Obligatorisch:True
Wert aus Pipeline:True
Wert aus Pipeline nach dem Eigenschaftsnamen:False
Wert aus verbleibenden Argumenten:False

-RoleName

Der Name der Rolle.

Parametereigenschaften

Typ:String
Standardwert:None
Unterstützt Platzhalter:False
Nicht anzeigen:False
Aliase:Name

Parametersätze

(All)
Position:Named
Obligatorisch:True
Wert aus Pipeline:False
Wert aus Pipeline nach dem Eigenschaftsnamen:True
Wert aus verbleibenden Argumenten:False

CommonParameters

Dieses Cmdlet unterstützt die allgemeinen Parameter -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction und -WarningVariable. Weitere Informationen findest du unter about_CommonParameters.

Eingaben

PSGalleryInVMAccessControlProfileVersion

String

Ausgaben

PSGalleryInVMAccessControlProfileVersion