Click to Rate and Give Feedback
TechNet
TechNet Library
Scripting
Windows Powershell
 Windows PowerShell Cmdlets
Windows PowerShell Cmdlets

Published: May 20, 2009

Updated: February 29, 2012

Applies To: Windows PowerShell 2.0, Windows PowerShell 3.0

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

A cmdlet (pronounced "command-let") is a single-feature command that manipulates objects in Windows PowerShell. You can recognize cmdlets by their name format -- a verb and noun separated by a dash (-), such as Get-Help, Get-Process, and Start-Service.

In traditional shells, the commands are executable programs that range from the very simple (such as attrib.exe) to the very complex (such as netsh.exe).

In Windows PowerShell, most cmdlets are very simple, and they are designed to be used in combination with other cmdlets. For example, the "get" cmdlets only retrieve data, the "set" cmdlets only establish or change data, the "format" cmdlets only format data, and the "out" cmdlets only direct the output to a specified destination.

Each cmdlet has a help file that you can access by typing:

get-help <cmdlet-name> -detailed

The detailed view of the cmdlet help file includes a description of the cmdlet, the command syntax, descriptions of the parameters, and an example that demonstrate use of the cmdlet.



Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
&lt;cmdletname&gt; /?      Hossein.A ... Thomas Lee   |   Edit   |   Show History
Thomas Lee,

  • The <cmdletname> /?
    will not work in Windows PowerShell or Windows PowerShell ISE.
[tfl] correct - it should <cmdletname> -? (not /?)

The others work,
  • Get-Help &;;lt;cmdlet-name&;;gt;
or,
  • Get-Help &;;lt;cmdlet-name&;;gt; -detailed
Tags What's this?: cmlet (x) help (x) Add a tag
Flag as ContentBug
Two Small clarifications      Thomas Lee   |   Edit   |   Show History

1.In the paragraph starting "In traditional shells" - this should either read "In traditional Windows Shells", or the examples shown of executable commands should be updated to include non-Windows related programmes (attrib.exe and netsh.exe are windows only apps!).

2. In the above text, it says:

Each cmdlet has a help file that you can access by typing:
get-help <cmdlet-name> -detailed


True - but you don't have to use the -detailed parameter, you can just type:


get-Help <cmdlet-name> or
<cmdletname> -?
List of cmdlets      iancc1 ... Thomas Lee   |   Edit   |   Show History
How do I display a list of the available cmdlets?

To answer above question, use get-command to list all cmdlets/aliases in the current PS session. You can also use -Module option to list all cmdlets in the module. Hope this helps.
Tags What's this?: Add a tag
Flag as ContentBug
redundant      DonnieBax   |   Edit   |   Show History
Just to clarify, I see what you are talking about in the comments concerning "traditional shells", however in the text above it states that this information applies to windows shells, so your comment would be redundant, altho I agree with your comment I thought I would point that out.
Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker