PowerShell – What type is my variable?

When learning you will propably encounter a situation where you would want to know of which type your variable is… a string, array, integrr, boolean…?
At the time when you’re more advanced in PowerShell you will look at the code where you create the variable and know what type it is… but especially when you’re learning the basics this is not so easy.

So how do you know?
It’s actually pretty easy… all variables have the ‘GetType’ method attached to it which gives you the feedback what type the variable is 🙂

2 comments

  1. Jeff Wouters says:

    Hi Jeffery, Nice one!

Leave a Reply

Your email address will not be published. Required fields are marked *