What's new with hash tables in PowerShell 3.0 is they can
be[Ordered]. With just one command you can sequence values thus: [Ordered]@{"Key1" = "Value 1";"Key2" =
"Value 2; etc ..."}.
Arrays are useful, but only if you have a series of single values.
Hash tables extend arrays by allowing you to have data in the format of
Key = Value.
Name Value --------- ----- England Rose Ireland
Shamrock Scotland Thistle Wales Daffodil
Guy Recommends: A Free Trial of the Network Performance Monitor
(NPM)
SolarWinds'
Network Performance Monitor
will help you discover what's happening on your network. This
utility will also guide you through troubleshooting; the dashboard will
indicate whether the root cause is a broken link, faulty equipment or
resource overload.
What I like best is the way NPM suggests solutions to network
problems. Its also has the ability to monitor the health of individual VMware
virtual machines. If you are interested in troubleshooting, and creating
network maps, then I recommend that you try NPM now.
Hashtables are sometimes called dictionaries; whatever the name, and
whatever the spelling, you can list the full set of methods and properties by
appending | Get-Member.
One benefit of creating a hash table is that you can add data, for
example:
$Countries.Add("France", "Cockrell")
Note 4: The .Add method requires (Parenthesis) not
{curly} brackets.
Footnote: This research solves the mystery of why
PowerShell doesn't have a .Delete method; the reason is because it
consistently uses .Remove for this task.
Another new feature in version 3.0 is [Ordered] hash tables.
Thanks to this one word [ordered] you can achieve a quicker and better
solution for sequencing values than was possible in PowerShell v 2.0.
If you like this page then please share it with your friends
Windows Management Instrumentation (WMI) is
most useful for PowerShell scripting.
SolarWinds
have produced this
Free WMI Monitor to take the guess work out of which
WMI counters to use for applications like Microsoft Active Directory,
SQL or Exchange Server.