Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Find if Variable Is Array

$
0
0

Summary: Use Windows PowerShell to find if a variable is an array.

Hey, Scripting Guy! Question How can I use Windows PowerShell to find if a variable contains an array?

Hey, Scripting Guy! Answer Use the –is operator, and test to see if it is a type of [array], for example:

$a = 1,2,4,5,6,7

$a -is [array]


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>