New-AzGalleryInVMAccessControlProfileVersion
inVMAccessControlProfile'da galerinin yeni bir sürümünü oluşturur.
Syntax
Default (Varsayılan)
New-AzGalleryInVMAccessControlProfileVersion
-ResourceGroupName <String>
-GalleryName <String>
-GalleryInVMAccessControlProfileName <String>
-GalleryInVmAccessControlProfileVersion <PSGalleryInVMAccessControlProfileVersion>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Örnekler
Örnek 1
New-AzGalleryInVMAccessControlProfileVersion -ResourceGroupName "myResourceGroup" -GalleryName "myGallery" -GalleryInVMAccessControlProfileName "myProfile" -GalleryInVmAccessControlProfileVersion $inVMAccessControlProfileVersion
InVMAccessControlProfile'da bir galeri sürümü oluşturur.
Örnek 2
$rgname = "myResourceGroup"
$location = "West US 2"
$galleryName = "myGallery"
$inVMAccessProfileName = "myProfile"
$inVMAccessProfileVersionName = "myProfileVersion"
# Create a gallery
New-AzGallery -ResourceGroupName $rgname -GalleryName $galleryName -Location $location -Description "My custom image gallery"
# Create a gallery inVMAccessControlProfile
New-AzGalleryInVMAccessControlProfile -ResourceGroupName $rgname -GalleryName $galleryName -GalleryInVMAccessControlProfileName $InVMAccessControlProfileName -Location $location -OsType "Windows" -ApplicableHostEndPoint "WireServer"
# Create a gallery inVMAccessControlProfile version config
$inVMAccessControlProfileVersion = New-AzGalleryInVMAccessControlProfileVersionConfig -Name $inVMAccessControlProfileVersionName -Location $location -Mode "Audit" -DefaultAccess "Deny" -TargetLocation @("Wesut US2", "West US") -ExcludeFromLatest
# Add rules to PSGalleryInVMAccessControlProfileVersion
Add-AzGalleryInVMAccessControlProfileVersionRulesPrivilege -GalleryInVmAccessControlProfileVersion $inVMAccessControlProfileVersion -PrivilegeName "GoalState" -Path "/machine" -QueryParameter @{ comp = "goalstate" }
Add-AzGalleryInVMAccessControlProfileVersionRulesRole -GalleryInVmAccessControlProfileVersion $inVMAccessControlProfileVersion -RoleName "Provisioning" -Privilege @("GoalState")
Add-AzGalleryInVMAccessControlProfileVersionRulesIdentity -GalleryInVmAccessControlProfileVersion $inVMAccessControlProfileVersion -IdentityName "WinPA" -UserName "SYSTEM" -GroupName "Administrators" -ExePath "C:\Windows\System32\cscript.exe" -ProcessName "cscript"
Add-AzGalleryInVMAccessControlProfileVersionRulesRoleAssignment -GalleryInVmAccessControlProfileVersion $inVMAccessControlProfileVersion -Role "Provisioning" -Identity @("WinPA")
# Create the gallery inVMAccessControlProfile version resource in Azure
New-AzGalleryInVMAccessControlProfileVersion -ResourceGroupName $rgname -GalleryName $galleryName -GalleryInVMAccessControlProfileName $inVMAccessProfileName -GalleryInVmAccessControlProfileVersion $inVMAccessControlProfileVersion
Önce bir galeri ve InVM Access Control Profili oluşturup ardından kurallarla yerel profil sürümü yapılandırması oluşturup son olarak Azure dağıtarak tam bir InVM Access Control Profili kurulumu oluşturur.
Parametreler
-Confirm
Cmdlet'i çalıştırmadan önce sizden onay ister.
Parametre özellikleri
Tür: SwitchParameter
Default value: None
Joker karakterleri destekler: False
DontShow: False
Diğer adlar: Cf
Parametre kümeleri
(All)
Position: Named
Zorunlu: False
İşlem hattından gelen değer: False
Özellik adına göre işlem hattından gelen değer: False
Kalan bağımsız değişkenlerden elde edilen değer: False
-DefaultProfile
Azure ile iletişim için kullanılan kimlik bilgileri, hesap, kiracı ve abonelik.
Parametre özellikleri
Tür: IAzureContextContainer
Default value: None
Joker karakterleri destekler: False
DontShow: False
Diğer adlar: AzContext, AzureRmContext, AzureCredential
Parametre kümeleri
(All)
Position: Named
Zorunlu: False
İşlem hattından gelen değer: False
Özellik adına göre işlem hattından gelen değer: False
Kalan bağımsız değişkenlerden elde edilen değer: False
-GalleryInVMAccessControlProfileName
VM Access Control Profilindeki Galerinin adı.
Parametre özellikleri
Tür: String
Default value: None
Joker karakterleri destekler: False
DontShow: False
Parametre kümeleri
(All)
Position: Named
Zorunlu: True
İşlem hattından gelen değer: False
Özellik adına göre işlem hattından gelen değer: True
Kalan bağımsız değişkenlerden elde edilen değer: False
-GalleryInVmAccessControlProfileVersion
New-AzGalleryInVMAccessControlProfileVersionConfig öğesinden oluşturulan PSGalleryInVmAccessControlProfileVersion nesnesi.
Parametre özellikleri
Parametre kümeleri
(All)
Position: Named
Zorunlu: True
İşlem hattından gelen değer: False
Özellik adına göre işlem hattından gelen değer: True
Kalan bağımsız değişkenlerden elde edilen değer: False
-GalleryName
Galerinin adı.
Parametre özellikleri
Tür: String
Default value: None
Joker karakterleri destekler: False
DontShow: False
Parametre kümeleri
(All)
Position: Named
Zorunlu: True
İşlem hattından gelen değer: False
Özellik adına göre işlem hattından gelen değer: True
Kalan bağımsız değişkenlerden elde edilen değer: False
-ResourceGroupName
Kaynak grubunun adı.
Parametre özellikleri
Tür: String
Default value: None
Joker karakterleri destekler: False
DontShow: False
Parametre kümeleri
(All)
Position: Named
Zorunlu: True
İşlem hattından gelen değer: False
Özellik adına göre işlem hattından gelen değer: True
Kalan bağımsız değişkenlerden elde edilen değer: False
-WhatIf
Cmdlet çalıştırılırsa ne olacağını gösterir. Cmdlet çalıştırılmaz.
Parametre özellikleri
Tür: SwitchParameter
Default value: None
Joker karakterleri destekler: False
DontShow: False
Diğer adlar: Wi
Parametre kümeleri
(All)
Position: Named
Zorunlu: False
İşlem hattından gelen değer: False
Özellik adına göre işlem hattından gelen değer: False
Kalan bağımsız değişkenlerden elde edilen değer: False
CommonParameters
Bu cmdlet yaygın parametreleri destekler: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction ve -WarningVariable. Daha fazla bilgi için bkz. about_CommonParameters .
Çıkışlar