Share via


Set-SCSPFVMRoleGalleryItem

Sets the publishing status of an item in the gallery.

Syntax

FromGalleryItemParameterSetName (Default)

Set-SCSPFVMRoleGalleryItem
    -VmRoleGalleryItem <VMRoleGalleryItem>
    -PublishingStatus <String>
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

FromGalleryItemPackageParameterSetName

Set-SCSPFVMRoleGalleryItem
    -VmRoleGalleryItem <VMRoleGalleryItem>
    -Package <Stream>
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

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

Examples

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.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Package

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

Parameter properties

Type:System.IO.Stream
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromGalleryItemPackageParameterSetName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PublishingStatus

Specifies either published or un-published.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromGalleryItemParameterSetName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VmRoleGalleryItem

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

Parameter properties

Type:Microsoft.SystemCenter.Foundation.SPFData.Types.Gallery.VMRoleGalleryItem
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromGalleryItemParameterSetName
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Microsoft.SystemCenter.Foundation.SPFData.Types.Gallery.VMRoleGalleryItem

Outputs

System.Object