New-AzGalleryInVMAccessControlProfileVersion
Membuat versi baru galeri diVMAccessControlProfile.
Sintaks
Default (Default)
New-AzGalleryInVMAccessControlProfileVersion
-ResourceGroupName <String>
-GalleryName <String>
-GalleryInVMAccessControlProfileName <String>
-GalleryInVmAccessControlProfileVersion <PSGalleryInVMAccessControlProfileVersion>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Deskripsi
Contoh
Contoh 1
New-AzGalleryInVMAccessControlProfileVersion -ResourceGroupName "myResourceGroup" -GalleryName "myGallery" -GalleryInVMAccessControlProfileName "myProfile" -GalleryInVmAccessControlProfileVersion $inVMAccessControlProfileVersion
Membuat versi galeri diVMAccessControlProfile.
Contoh 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
Membuat penyiapan Profil Access Control InVM lengkap dengan terlebih dahulu membuat galeri dan Profil Access Control InVM, lalu membangun konfigurasi versi profil lokal dengan aturan, dan akhirnya menyebarkannya ke Azure.
Parameter
-Confirm
Meminta konfirmasi sebelum menjalankan cmdlet.
Properti parameter
Jenis: SwitchParameter
Nilai default: None
Mendukung wildcard: False
DontShow: False
Alias: Cf
Kumpulan parameter
(All)
Position: Named
Wajib: False
Nilai dari alur: False
Nilai dari alur berdasarkan nama properti: False
Nilai dari argumen yang tersisa: False
-DefaultProfile
Kredensial, akun, penyewa, dan langganan yang digunakan untuk komunikasi dengan Azure.
Properti parameter
Jenis: IAzureContextContainer
Nilai default: None
Mendukung wildcard: False
DontShow: False
Alias: AzContext, AzureRmContext, AzureCredential
Kumpulan parameter
(All)
Position: Named
Wajib: False
Nilai dari alur: False
Nilai dari alur berdasarkan nama properti: False
Nilai dari argumen yang tersisa: False
-GalleryInVMAccessControlProfileName
Nama Galeri di Profil Access Control VM.
Properti parameter
Jenis: String
Nilai default: None
Mendukung wildcard: False
DontShow: False
Kumpulan parameter
(All)
Position: Named
Wajib: True
Nilai dari alur: False
Nilai dari alur berdasarkan nama properti: True
Nilai dari argumen yang tersisa: False
-GalleryInVmAccessControlProfileVersion
Objek PSGalleryInVmAccessControlProfileVersion yang dibuat dari New-AzGalleryInVMAccessControlProfileVersionConfig.
Properti parameter
Kumpulan parameter
(All)
Position: Named
Wajib: True
Nilai dari alur: False
Nilai dari alur berdasarkan nama properti: True
Nilai dari argumen yang tersisa: False
-GalleryName
Nama galeri.
Properti parameter
Jenis: String
Nilai default: None
Mendukung wildcard: False
DontShow: False
Kumpulan parameter
(All)
Position: Named
Wajib: True
Nilai dari alur: False
Nilai dari alur berdasarkan nama properti: True
Nilai dari argumen yang tersisa: False
-ResourceGroupName
Nama grup sumber daya.
Properti parameter
Jenis: String
Nilai default: None
Mendukung wildcard: False
DontShow: False
Kumpulan parameter
(All)
Position: Named
Wajib: True
Nilai dari alur: False
Nilai dari alur berdasarkan nama properti: True
Nilai dari argumen yang tersisa: False
-WhatIf
Menunjukkan apa yang akan terjadi ketika cmdlet dijalankan. Cmdlet tidak dijalankan.
Properti parameter
Jenis: SwitchParameter
Nilai default: None
Mendukung wildcard: False
DontShow: False
Alias: wi
Kumpulan parameter
(All)
Position: Named
Wajib: False
Nilai dari alur: False
Nilai dari alur berdasarkan nama properti: False
Nilai dari argumen yang tersisa: False
CommonParameters
Cmdlet ini mendukung parameter umum: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, dan -WarningVariable. Untuk informasi selengkapnya, lihat about_CommonParameters .
Output