PowerShell and Visio
I’ve blogged about using PowerShell with various members of the Office family before. I thought its about time I looked at Visio. I use Visio quite a bit and it would be useful to be able to drive it with PowerShell
Office still uses COM objects so we need to create a Viso object and then the document and page we are working on. We are using the basic template and are going to add a stencil for the Enterprise Applications. A couple of objects are created for the server and workstation shapes and then we drop them on to the page.
We can then save the drawing and quit visio.
A simple drawing that we will need to embellish but it shows how straight forward it is to automate the production of drawings. The great thing is that we can then go back into the drawing and manipulate it as we need.