Set-SCSpfVMRoleGalleryItem

Sets the publishing status of an item in the gallery.

Syntax

Set-SCSpfVMRoleGalleryItem [-Confirm] -Package <Stream> -VmRoleGalleryItem <VMRoleGalleryItem> [-WhatIf]
 [<CommonParameters>]
Set-SCSpfVMRoleGalleryItem [-Confirm] -PublishingStatus <String> -VmRoleGalleryItem <VMRoleGalleryItem>
 [-WhatIf] [<CommonParameters>]

Description

The Set-SCSPFVMRoleGalleryItem cmdlet sets the publishing status of an item in the gallery to either publish or un-publish.

Examples

Example 1: Set a gallery item to publish

PS C:\>Set-SCSPFVmRoleGalleryItem -VmRoleGalleryItem $GalleryItem -PublishingStatus "published"

This command sets the publishing status of an item in the gallery to "published".

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-Package

Specifies an object of type System.IO.MemoryStream that contains the resource package of the gallery item.

Type:Stream
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PublishingStatus

Specifies either published or un-published.

Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VmRoleGalleryItem

Specifies the gallery item of which to set the publishing status.

Type:VMRoleGalleryItem
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False