Set-SCSPFVMRoleGalleryItem
設定資源庫中專案的發佈狀態。
Syntax
Set-SCSPFVMRoleGalleryItem
-VmRoleGalleryItem <VMRoleGalleryItem>
-PublishingStatus <String>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCSPFVMRoleGalleryItem
-VmRoleGalleryItem <VMRoleGalleryItem>
-Package <Stream>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Set-SCSPFVMRoleGalleryItem Cmdlet 會將資源庫中專案的發佈狀態設定為發佈或取消發佈。
範例
範例 1:設定要發佈的資源庫專案
PS C:\>Set-SCSPFVmRoleGalleryItem -VmRoleGalleryItem $GalleryItem -PublishingStatus "published"
此命令會將資源庫中專案的發佈狀態設定為「已發佈」。
參數
-Confirm
在執行 Cmdlet 前提示您確認。
Type: | System.Management.Automation.SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Package
指定 System.IO.MemoryStream 類型的物件,其中包含資源庫專案的資源套件。
Type: | System.IO.Stream |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PublishingStatus
指定已發行或未發行。
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VmRoleGalleryItem
指定要設定發佈狀態的圖庫專案。
Type: | Microsoft.SystemCenter.Foundation.SPFData.Types.Gallery.VMRoleGalleryItem |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
顯示執行 Cmdlet 後會發生的情況。 Cmdlet 並不會執行。
Type: | System.Management.Automation.SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
輸入
Microsoft.SystemCenter.Foundation.SPFData.Types.Gallery.VMRoleGalleryItem
輸出
System.Object