Get-Command is like a waiter who will not only take your order for a
cmdlet, but also recommend other tasty PowerShell dishes.
If you are new to PowerShell Get-Command is a good cmdlet for practicing
the basics. For more experienced users this page will help you
discover more of the 250+ PowerShell v 2.0 cmdlets.
In the case of Windows 7 and later, you don't need to download any extra files, just: 'Add Feature'
--> Windows PowerShell.
However, for older operating systems, there are different versions of PowerShell for XP, Windows Server 2003 and
Vista. For such legacy systems only, you need to
download PowerShell from Microsoft's site.
Once you have installed PowerShell 2.0 or later, I recommend choosing the
ISE (Integrated Scripting Engine) version, it
will save buying a text editor.
Get-Command is one of the few built-In cmdlets that returns results on
its own. However the list is so long that the art of using Get-Command
is to select the best filter.
# PowerShell Get-Command Clear-Host Get-Command
Note: This will return all the cmdlets and their
aliases. Maybe you need a filter? If so see below.
Windows Management Instrumentation (WMI) is one of the hidden
treasures of Microsoft's operating systems. Fortunately, SolarWinds
have created a
Free WMI Monitor so that you can discover these gems of performance
information, and thus improve your PowerShell scripts.
Take the guess work out of which WMI counters to use when scripting the
operating system, Active Directory, or Exchange Server. Give this WMI monitor a
try - it's free.
As you get to know PowerShell better so you become familiar with verbs
such as 'Set' or 'Get' and nouns such as 'Process' or 'Computer'.
This is why I now prefer to filter Get-Command with -Noun or -Verb.
One of my greatest successes was finding 'Restart-Service'. I had
used start and stop-service, but when I tried this filter I unearthed
the useful Restart-Service.
# PowerShell Get-Command Nouns Clear-Host Get-Command
-Noun
Service
Here is an utility where you can review firewall settings such as
access control lists (ACL), or troubleshoot problems with network
address translation (NAT).
Other reasons to download this SolarWinds Firewall Browser include
managing requests to change your firewall settings, testing firewall
rules before you go live, and querying settings with the browser's
powerful search options.
Please email me if you have a better example script. Also please report any factual mistakes, grammatical errors or broken links, I will be happy to correct the fault.
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.