Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

Stars 654
Forks 82
Open issues 1
Total downloads 4,320,051
Release OfficeIMO-v3.5.3
Language: C# Updated: 2026-11-03
Cmdlet

Export-OfficeVisioStencilPreviewGallery

Aliases: Export-VisioStencilPreviewGallery
Module
PSWriteOffice
Aliases
Export-VisioStencilPreviewGallery
Inputs
None
Outputs
OfficeIMO.Visio.Stencils.VisioStencilPreviewGallery

Exports preview artwork from a Visio stencil package into a browsable HTML gallery.

Syntax

Export-OfficeVisioStencilPreviewGallery
[-DefaultHeight <Double>]
[-DefaultWidth <Double>]
[-IncludeUnsupportedMasters]
[-IndexFileName <String>]
[-MasterName <String[]>]
[-NoIndex]
[-NoLearnMasterDimensions]
[-NoThumbnails]
[-OutputDirectory] <String>
[-PassThru]
[-Path] <String>
[-PreviewDirectoryName <String>]
[-ThumbnailDirectoryName <String>]
[-ThumbnailHeight <Int32>]
[-ThumbnailWidth <Int32>]
[-Title <String>]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Examples

Create a stencil preview gallery.

$gallery = Export-OfficeVisioStencilPreviewGallery -Path .\MyShapes.vssx -OutputDirectory .\StencilGallery -Title 'Custom stencil previews' -PassThru
$gallery | Select-Object PackagePath, IndexPath, BrowserRenderableCount, ThumbnailCount

Extracts preview artwork from package-backed masters and writes preview files plus an HTML index.

Parameters

-DefaultHeight Double optional
Default height for package-backed stencils when dimensions cannot be learned.
-DefaultWidth Double optional
Default width for package-backed stencils when dimensions cannot be learned.
-IncludeUnsupportedMasters SwitchParameter optional
Include unsupported package masters when looking for preview artwork.
-IndexFileName String optional
Generated HTML index file name.
-MasterName String[] optional
Optional master filters for package-backed catalogs.
-NoIndex SwitchParameter optional
Do not write an HTML index file.
-NoLearnMasterDimensions SwitchParameter optional
Skip reading master dimensions from package master parts.
-NoThumbnails SwitchParameter optional
Do not write browser-renderable thumbnail wrappers.
-OutputDirectory String requiredposition: 1
Directory that receives preview payloads, thumbnails, and the HTML index.
-PassThru SwitchParameter optional
Emit the structured gallery result after the files are written.
-Path String requiredposition: 0aliases: FilePath, LiteralPath
Visio package path, such as .vsdx, .vssx, or .vstx.
-PreviewDirectoryName String optional
Subdirectory that receives extracted preview payload files.
-ThumbnailDirectoryName String optional
Subdirectory that receives generated thumbnail wrappers.
-ThumbnailHeight Int32 optional
Generated thumbnail height in pixels.
-ThumbnailWidth Int32 optional
Generated thumbnail width in pixels.
-Title String optional
Gallery title. When omitted, a title is derived from the package name.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.