VisioPowerShell
Version 4.5
Version 4.5
  • Introduction
  • Quick start
  • Links
  • Basics
    • Geometry primitves
    • Context-sensitivity
    • Drop shape masters
    • Format shapes with cells
    • Draw basic shapes
    • Create pages
    • Enumerate shapes
    • Bound Visio application
    • Close Visio applications
    • List cmdlets
    • List of all cmdlets
    • Get help for a cmdlet
    • Tips
    • Verbose logging
  • Automatic diagrams
    • Org charts from XML
    • Directed graphs from code
    • Directed graphs from XML
      • Sample Directed Graph XML 1
      • Sample Directed Graph XML 2
      • Sample Directed Graph XML 3
      • Sample Directed Graph XML 4
  • Samples
    • Draw grid
    • Draw fill patterns - slow
    • Draw fill patterns - fast
    • Countdown days
  • Installation
    • Install VisioPS
    • Uninstall VisioPS
    • Detect if VisioPS is installed
  • Technical notes
    • Visio
      • Visio version compatibility
      • Create a new Visio application COM object
    • PowerShell
      • Install PowerShell
      • Detect installed PowerShell version
      • PowerShell version compatibility
      • Use PowerShell 2 with .NET Framework 2.0
    • VisioClient
    • Use VisioAutomation
  • Cmdlets
    • Documents
      • Close-VisioDocument
      • Get-VisioDocument
      • New-VisioDocument
      • Open-VisioDocument
      • Save-VisioDocument
    • Container
    • Custom properties
      • Get-VisioCustomProperty
      • Remove-VisioCustomProperty
      • Set-VisioCustomProperty
      • Examples
    • Hyperlinks
      • Get-VisioHyperlink
      • New-VisioHyperlink
      • Remove-VisioHyperlink
    • Master
      • Get-VisioMaster
    • Pages
      • Copy-VisioPage [TBD]
      • Export-VisioPage
      • Format-VisioPage
      • Get-VisioPage
      • Measure-VisioPage
      • New-VisioPage
      • Remove-VisioPage
      • Select-VisioPage [TBD]
    • PageCells
    • Shapes
      • Connect-VisioShape
      • Copy-VisioShape
      • Export-VisioShape
      • Format-VisioShape
      • Get-VisioShape
      • Join-VisioShape
      • Lock-VisioShape
      • Select-VisioShape
      • Select-VisioShape Invert
      • Select-VisioShape -None
      • Split-VisioShape
      • Test-VisioShape
      • Unlock-VisioShape
      • Examples of Join-VisioShape and Split-VisioShape
    • ShapeCells
      • Set-VisioShapeCells for text
      • Shape cells
    • User-defined cells
      • Get-UserDefinedCell
      • Set-VisioUserDefinedCell
      • Remove-UserDefinedCell
    • Selection
      • Export-VisioSelection
      • Test-VisioSelectedShapes
    • Text
      • Get-VisioText [TBD]
      • Set-VisioText
    • VisioApplication
      • Close-VisioApplication
      • Get-VisioApplication
      • New-VisioApplication
      • Out-VisioApplication
      • Test-VisioApplication
      • Undo-VisioApplication
      • Redo-VisioApplication
    • Windows
      • Format-VisioWindow
  • Developer Info
    • Release history
    • Publis to PowerShell Gallery
    • Debug with Visual Studio
Powered by GitBook
On this page
  1. Basics

Close Visio applications

While you are writing scripts to automate Visio, at some point you'll be running script over and over and you'll notice you've created many instances of Visio. Stopping them manually can take some time. Fortunately you can quickly kill them by running the following command.

Stop-Process -name "Visio"

This cmdlet will have an error if there are no Visio applications open. So you can handle that case with this command:

stop-process -name visio -ErrorAction ignore
PreviousBound Visio applicationNextList cmdlets

Last updated 6 years ago