Hi guys,

I have been working with Classes for a long while now. I tend to use them ALL-THE-TIME ! One thing that I realized that is missing, is a UML diagram, to see the Class structure. To be able to see the properties, methods, constructors and even the inheritance is really usefully to have a UML diagram to be able to see our constructs on a higher level. It helps us to understand our code constructs better, and see potential errors.

I was also very keen to try out the PSgraph module of @kevinMarket , so this seemed like the perfect opportunity. A couple a days ago, I published a Script called “Write-UMLClassDiagram” which actually does exactly that: It reads a .ps1/.psm1 and document it’s classes.




The following (very basic) class located, lets say in C:\temp\Inheritance.ps1



Calling Write-UMLClassDiagram

Using the -Show will automatically open the generated document, and we will be able to see something like this:


There are tons of examples on the github page of the project –> https://github.com/Stephanevg/Write-UMLClassDiagram


I’ll invite you to download a copy of it, and try it out. Looking forward to your feedback!



By | 2018-06-15T15:02:27+00:00 June 15th, 2018|PowerShell|0 Comments

About the Author:

Stéphane is a dynamic and passionate Cloud and datacenter Microsoft MVP since. He is the founder of the Basel PowerShell user Group (BPUG), the co-founder of the French Speaking PowerShell UserGroup (FRPSUG), author, blogger, and received the community award "PowerShell Hero" from PowerShell.org. Stéphane has implemented microsoft infrastructure solutions in various countries of Europe and is currently working in Basel / Switzerland. Stéphane help his clients to reduce their global infrastructure costs by implementing Microsft infrastructure solutions by combining great products such as System Center, Windows Server, with heavy automation using Windows PowerShell. Stéphane loves languages, Belgium beer, French cheese and French Wine. If any of these topics are of your interest, don't hesitate to come and say hi.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: