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

PowerTip: Display Keys from Hash Table

$
0
0

Summary: Learn how to display keys from a hash table.

Hey, Scripting Guy! Question How can I display only the keys in a Windows PowerShell hash table?

Hey, Scripting Guy! Answer Store the hash table in a variable, and then use the Keys property, for example:

$a = @{a=1;b=2;c=3;d=4}

$a.Keys


Viewing all articles
Browse latest Browse all 3333

Trending Articles