Checking and Casting Data Types

Learn how to check the type of data and how to cast it into different data types.

Checking the Data Type

Every Powershell object automatically has an in-built method, GetType(), which can be accessed using the (.) dot operator, as demonstrated in the following example to check data types.

Get hands-on with 1200+ tech skills courses.