Set-SCSPFVMRoleGalleryItem
设置库中项的发布状态。
语法
Set-SCSPFVMRoleGalleryItem
-VmRoleGalleryItem <VMRoleGalleryItem>
-PublishingStatus <String>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCSPFVMRoleGalleryItem
-VmRoleGalleryItem <VMRoleGalleryItem>
-Package <Stream>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
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