Update-AzGalleryInVMAccessControlProfileVersion
更新 VMAccessControlProfile 中資源庫的特定版本。
語法
Default (預設值)
Update-AzGalleryInVMAccessControlProfileVersion
-GalleryInVmAccessControlProfileVersion <PSGalleryInVMAccessControlProfileVersion>
[-TargetLocation <String[]>]
[-ExcludeFromLatest <Boolean>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Update-AzGalleryInVMAccessControlProfileVersion Cmdlet 會更新 VMAccessControlProfile 中資源庫的特定版本。
若要更新的資源庫 inVMAccessControlVersion ,您可以藉由提供從 Get-AzGalleryInVMAccessControlProfileVersion Cmdlet 擷取的 PSGalleryInVMAccessControlProfileVersion 物件來傳遞。
範例
範例 1
$CPversion = Get-AzGalleryInVMAccessControlProfileVersion -ResourceGroupName "myResourceGroup" -GalleryName "myGallery" -GalleryInVMAccessControlProfileName "myProfile" -GalleryInVMAccessControlProfileVersionName "myProfileVersion"
Update-AzGalleryInVMAccessControlProfileVersion -GalleryInVmAccessControlProfileVersion $CPversion -TargetLocation @("West US 2", "West US") -ExcludeFromLatest $true
此範例會先使用 Get-AzGalleryInVMAccessControlProfileVersion 來擷取需要更新的 VMAccessControlProfile 中指定的資源庫版本。
然後,它會使用 Update-AzGalleryInVMAccessControlProfileVersion 來更新其 TargetLocation 和 excludeFromLatest 屬性。
參數
-Confirm
在執行 Cmdlet 之前,提示您進行確認。
參數屬性
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-DefaultProfile
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
參數屬性
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-ExcludeFromLatest
如果設定為 true,從最新版資源配置檔部署的虛擬機將不會使用此配置檔版本。
參數屬性
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
-GalleryInVmAccessControlProfileVersion
PSGalleryInVmAccessControlProfileVersion 從 New-AzGalleryInVMAccessControlProfileVersionConfig 建立的物件。
參數屬性
參數集
(All)
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
-TargetLocation
資源設定檔版本要複寫到的目標區域名稱。 這個屬性是可更新的。
參數屬性
| 類型: | String[]
|
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
-WhatIf
顯示 Cmdlet 執行時會發生什麼事。 指令未執行。
參數屬性
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
CommonParameters
此 Cmdlet 支援常見參數:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters。
輸出