Close documents
Closing the active document
Close-VisioDocument
Forcing a document to close
If the document has been modified then Visio won't close the document automatically. Instead it will ask the user to close or not.
To avoid this prompt and force Visio to close the document use -Force
.
Close-VisioDocument -Force
Closing a specific document
You can specify the document object to close
Close-VisioDocument -Documents $doc1
Closing multiple documents
Close-VisioDocument -Documents doc1,doc2 -Force
Close all documents
$docs = Get-VisioDocument
Close-VisioDocuments $docs -Force
Last updated