Windows PowerShell


Windows PowerShell
Windows PowerShell
Windows PowerShell icon.png
Windows PowerShell 1.0 PD.png
Screenshot of a sample PowerShell session
Developer(s) Microsoft Corporation
Initial release November 14, 2006; 4 years ago (2006-11-14)
Stable release 2.0 / July 22, 2009; 2 years ago (2009-07-22)
Preview release 3.0 / 19 September 2011; 55 days ago (2011-09-19)
Development status Active
Operating system Windows XP
Windows Server 2003
Windows Vista
Windows Server 2008
Windows 7
Windows Server 2008 R2
Platform .NET Framework
Type Operating system shell
License Proprietary software; a component of Microsoft Windows
Website microsoft.com/powershell
PowerShell
Paradigm(s) Multi-paradigm: Imperative, pipeline, object-oriented, functional and reflective
Appeared in 2006
Designed by Jeffrey Snover, Bruce Payette, James Truher (et al.)
Developer Microsoft Corporation
Typing discipline Strong, safe, implicit and dynamic
Influenced by Ksh, Perl, C#,[1] CL, DCL, SQL, Tcl and Tk[2]
Platform .NET Framework
OS Microsoft Windows

Windows PowerShell is Microsoft's task automation framework, consisting of a command-line shell and associated scripting language built on top of, and integrated with the .NET Framework. PowerShell provides full access to COM and WMI, enabling administrators to perform administrative tasks on both local and remote Windows systems.

In PowerShell, administrative tasks are generally performed by cmdlets (pronounced command-lets), specialized .NET classes implementing a particular operation. Sets of cmdlets may be combined together in scripts, executables (which are standalone applications), or by instantiating regular .NET classes (or WMI/COM Objects).[3][4] These work by accessing data in different data stores, like the filesystem or registry, which are made available to the PowerShell runtime via Windows PowerShell providers.

Windows PowerShell also provides a hosting mechanism with which the Windows PowerShell runtime can be embedded inside other applications. These applications then leverage Windows PowerShell functionality to implement certain operations, including those exposed via the graphical interface. This capability has been utilized by Microsoft Exchange Server 2007[3][5] to expose its management functionality as PowerShell cmdlets and providers and implement the graphical management tools as PowerShell hosts which invoke the necessary cmdlets. Other Microsoft applications including Microsoft SQL Server 2008[6] also expose their management interface via PowerShell cmdlets. With PowerShell, graphical interface-based management applications on Windows are layered on top of Windows PowerShell. A PowerShell scripting interface for Windows products is mandated by the Common Engineering Criteria.[7]

Windows PowerShell includes its own extensive, console-based help, similar to man pages in Unix shells via the Get-Help cmdlet.

Contents

Versions

Initially using the code name "Monad", PowerShell was first shown publicly at the Professional Developers Conference in September 2003. There are currently two versions of PowerShell supported by Microsoft.[8]

Version 1.0 was released in 2006 for Windows XP SP2/SP3, Windows Server 2003, and Windows Vista. For Windows Server 2008, it is included as an optional feature.

Version 2.0 is integrated with Windows 7 and Windows Server 2008 R2 and is released for Windows XP with Service Pack 3, Windows Server 2003 with Service Pack 2 and Windows Vista with Service Pack 1.[9]

Background

Every released version of Microsoft DOS and Microsoft Windows for personal computers has included a command-line interface tool (shell). These are COMMAND.COM (in installations relying on MS-DOS, including Windows 9x) and cmd.exe (in Windows NT family operating systems). These are regular command line interpreters that support a few basic commands. For other purposes, a separate console application needs to be provided, to be invoked from these shells. They also include a scripting language (batch files), which can be used to automate various tasks. However, they cannot be used to automate all facets of GUI functionality, in part because command-line equivalents of operations exposed via the graphical interface are limited, and the scripting language is elementary and does not allow the creation of complex scripts. In Windows Server 2003, the situation was improved,[10] but scripting support was still considered unsatisfactory.

Microsoft attempted to address some of these shortcomings by introducing the Windows Script Host in 1998 with Windows 98, and its command-line based host: cscript.exe. It integrates with the Active Script engine and allows scripts to be written in compatible languages, such as JScript and VBScript, leveraging the APIs exposed by applications via COM. However, it too has its own deficiencies: it is not integrated with the shell, its documentation is not very accessible, and it quickly gained a reputation as a system vulnerability vector after several high-profile computer viruses exploited weaknesses in its security provisions. Different versions of Windows provided various special-purpose command line interpreters (such as netsh and WMIC) with their own command sets. None of them were integrated with the command shell; nor were they interoperable.

By 2002 Microsoft had started to develop a new approach to command line management, including a shell called Monad (aka Microsoft Shell or MSH). The shell and the ideas behind it were published in August 2002 in a white paper entitled Monad Manifesto.[11] Monad was to be a new extensible command shell with a fresh design that would be capable of automating a full range of core administrative tasks. Microsoft first showed off Monad at the Professional Development Conference in Los Angeles in September 2003. A private beta program began a few months later which eventually led to a public beta program.

Microsoft published the first Monad public beta release on June 17, 2005, Beta 2 on September 11, 2005, and Beta 3 on January 10, 2006. Not much later, on April 25, 2006 Microsoft formally announced that Monad had been renamed Windows PowerShell, positioning it as a significant part of their management technology offerings.[12] Release Candidate 1 of PowerShell was released at the same time. A significant aspect of both the name change and the RC was that this was now a component of Windows, and not an add-on product.

Release Candidate 2 of PowerShell version 1 was released on September 26, 2006 with final Release to the web (RTW) on November 14, 2006 and announced at TechEd Barcelona. PowerShell for earlier versions of Windows was released on January 30, 2007.[13]

The road to PowerShell version 2 began pretty much as soon as V1 shipped. There were three community technology preview (CTP) releases that Microsoft made available to the public. The last CTP release of Windows PowerShell v2.0 was made available in December 2008.

PowerShell v2.0 was completed and released to manufacturing in August 2009, as an integral part of Windows 7 and Windows Server 2008 R2. Versions of PowerShell for Windows XP, Windows Server 2003, Windows Vista and Windows Server 2008 were released in October 2009 and are available for download for both 32-bit and 64-bit platforms.[14]

Overview

There are four kinds of commands Windows PowerShell can execute:

  • 'cmdlets', which are .NET programs, written by a developer, compiled into a dynamic-link library and loaded by a PowerShell script,
  • PowerShell scripts (files suffixed by '.ps1'),
  • PowerShell functions,
  • executable programs.

If a command is an executable program, PowerShell.exe launches it in a separate process; if it is a cmdlet, it is executed in the PowerShell process. PowerShell also provides an interactive command line interface, wherein the commands can be entered and their output displayed. The user interface, based on the Win32 console, offers customizable tab completion but lacks syntax highlighting. PowerShell also enables the creation of aliases for cmdlets, which are textually translated by PowerShell into invocations of the original commands. PowerShell also supports both named and positional parameters for commands. In executing a cmdlet, the job of binding the argument value to the parameter is done by PowerShell itself, but, for external executables, arguments are passed via the argv (or equivalent) variable array to be parsed by the executable.

Another concept used by PowerShell is that of a pipeline. Like Unix pipelines, PowerShell pipelines are used to compose complex commands, allowing the output of one command to be passed as input to another. A pipeline is set up by piping the output of one command (or pipeline) to another command, using the | operator. But, unlike its Unix counterpart, the PowerShell pipeline is an object pipeline; that is, the data passed between cmdlets are fully typed objects, rather than character streams. When data is piped as objects, the elements they encapsulate retain their structure and types across cmdlets, without the need for any serialization or explicit parsing of the stream, as would be the need if only character streams were shared. An object can also encapsulate certain functions that work on the contained data. These also become available to the recipient command for use.[15][16] For the last cmdlet in a pipeline, PowerShell automatically pipes its output object to the Out-Default cmdlet, which transforms the objects into a stream of format objects and then renders those to the screen.[17][18]

Because all PowerShell objects are .NET objects, they share a .ToString() method, which retrieves the text representation of the data in an object. Windows PowerShell uses this method to convert an object to text. In addition, it also allows formatting definitions to be specified, so the text representation of objects may be customized by choosing which data elements to display, and how. However, in order to maintain backwards compatibility, if an external executable is used in a pipeline, it receives a text stream representing the object, and does not integrate with the PowerShell type system.

The PowerShell Extended Type System (ETS) is based on the .NET type system, but with extended semantics (e.g. propertySets and 3rd party extensibility) . For example, it enables the creation of different views of objects by exposing only a subset of the data fields, properties, and methods, as well as specifying custom formatting and sorting behavior. These views are mapped to the original object using XML-based configuration files.[19]

Cmdlets

Cmdlets are specialized commands in the PowerShell environment that implement specific functions. These are the native commands in the PowerShell stack. Cmdlets follow a <verb>-<noun> naming pattern, such as Get-ChildItem, helping to make them self-descriptive.[20] Cmdlets output their results as objects, or collections thereof (including arrays), and can optionally receive input in that form, making them suitable for use as recipients in a pipeline. But, whereas PowerShell allows arrays and other collections of objects to be written to the pipeline, cmdlets always process objects individually. For collections of objects, PowerShell invokes the cmdlet on each object in the collection, in sequence.[20]

Cmdlets are specialized .NET classes, which the PowerShell runtime instantiates and invokes when they are run. Cmdlets derive either from Cmdlet or from PSCmdlet, the latter being used when the cmdlet needs to interact with the PowerShell runtime.[20] These base classes specify certain methods - BeginProcessing(), ProcessRecord() and EndProcessing() - which the cmdlet's implementation overrides to provide the functionality. Whenever a cmdlet is run, these methods are invoked by PowerShell in sequence, with ProcessRecord() being called if it receives pipeline input.[21] If a collection of objects is piped, the method is invoked for each object in the collection. The class implementing the Cmdlet must have one .NET attribute - CmdletAttribute - which specifies the verb and the noun that make up the name of the cmdlet. Common verbs are provided as an enum.

If a cmdlet receives either pipeline input or command-line parameter input, there must be a corresponding property in the class, with a mutator implementation. PowerShell invokes the mutator with the parameter value or pipeline input, which is saved by the mutator implementation in class variables. These values are then referred to by the methods which implement the functionality. Properties that map to command-line parameters are marked by ParameterAttribute[22] and are set before the call to BeginProcessing(). Those which map to pipeline input are also flanked by ParameterAttribute, but with the ValueFromPipeline attribute parameter set.[23]

The implementation of these cmdlet classes can refer to any .NET API and may be in any .NET language. In addition, PowerShell makes certain APIs available, such as WriteObject(), which is used to access PowerShell-specific functionality, such as writing resultant objects to the pipeline. Cmdlets can use .NET data access APIs directly or use the PowerShell infrastructure of PowerShell Providers, which make data stores addressable using unique paths. Data stores are exposed using drive letters, and hierarchies within them, addressed as directories. Windows PowerShell ships with providers for the file system, registry, the certificate store, as well as the namespaces for command aliases, variables, and functions.[24] Windows PowerShell also includes various cmdlets for managing various Windows systems, including the file system, or using Windows Management Instrumentation to control Windows components. Other applications can register cmdlets with PowerShell, thus allowing it to manage them, and, if they enclose any datastore (such as databases), they can add specific providers as well.

In PowerShell V2, a more portable version of Cmdlets called Modules have been added. The PowerShell V2 release notes state, "Modules allow script developers and administrators to partition and organize their Windows PowerShell code in self-contained, reusable units. Code from a module executes in its own self-contained context and does not affect the state outside of the module. Modules also enable you to define a restricted runspace environment by using a script."

Pipeline

PowerShell, like Unix/Linux based shells, implements a pipeline. This pipeline enables the output of one cmdlet to be piped as input to another cmdlet. For example, the output of the Get-Process cmdlet can be piped to the Sort-Object cmdlet (e.g. to sort the objects by handle count) and then to the Where-Object to filter any process that has, say, less than 1 MB of paged memory, then finally to the Select-Object cmdlet to select just the first 10 (i.e. the 10 processes based on handle count).

PowerShell differs from Unix/Linux in that structured .NET objects are passed between stages in the pipeline instead of typically unstructured text. Using objects eliminates the need to explicitly parse text output to extract data. [25]

Scripting

Windows PowerShell includes a dynamically typed scripting language which can implement complex operations using cmdlets imperatively. The scripting language supports variables, functions, branching (if-then-else), loops (while, do, for, and foreach), structured error/exception handling and closures/lambda expressions, as well as integration with .NET. Variables in PowerShell scripts have names that start with $; they can be assigned any value, including the output of cmdlets. While the language is untyped, internally the variables are stored with their types, which can be either primitive types or objects. Strings can be enclosed either in single quotes or in double quotes: when using double quotes, variables will be expanded even if they are inside the quotation marks. According to the variable syntax, if the path to a file is enclosed in braces preceded by a dollar sign (as in ${C:\foo.txt}), it refers to the contents of the file. If it is used as an L-value, anything assigned to it will be written to the file. When used as an R-value, it will be read from the file. If an object is assigned, it is serialized before storing it.

Object members can be accessed using . notation, as in C# syntax. PowerShell provides special variables, such as $args, which is an array of all the command line arguments passed to a function from the command line, and $_, which refers to the current object in the pipeline.[26] PowerShell also provides arrays and associative arrays. The PowerShell scripting language also evaluates arithmetic expressions entered on the command line immediately, and it parses common abbreviations, such as GB, MB, and KB.

Using the function keyword, PowerShell provides for the creation of functions, which can take parameters. A common problem for people new to PowerShell is that function arguments are separated by spaces, not commas:

  1. <function> <param1> <param2>: Calls the function with two arguments. (These arguments may be bound to parameters declared in the function definition or accessed by position from the $args array.)
  2. <function>(<param1>, <param2>): Calls the function with a single argument, a two element array.

PowerShell allows any .NET methods to be called by providing their namespaces enclosed in brackets ([]), and then using a pair of colons (::) to indicate the static method.[27] For example, [System.Console]::WriteLine("PowerShell"). Objects are created using the New-Object cmdlet. Calling methods of .NET objects is accomplished by using the regular . notation.[27]

For error handling, PowerShell provides a .NET-based exception handling mechanism. In case of errors, objects containing information about the error (Exception object) are thrown, which are caught using the trap keyword. However, the action-or-error is configurable; in case of an error, PowerShell can be configured to silently resume execution, without trapping the exception.[28]

Scripts written using PowerShell can be made to persist across sessions in a .ps1 file. Later, either the entire script or individual functions in the script can be used. Scripts and functions are used analogously with cmdlets, in that they can be used as commands in pipelines, and parameters can be bound to them. Pipeline objects can be passed between functions, scripts, and cmdlets seamlessly. However, script execution is disabled by default and must be enabled explicitly.[29] PowerShell scripts can be signed to verify their integrity, and are subject to Code Access Security.

The PowerShell scripting language supports binary prefix notation similar to the scientific notation supported by many programming languages in the C-family.

Hosting

Another use of PowerShell is being embedded in a management application, which then uses the PowerShell runtime to implement the management functionality. For this, PowerShell provides a managed hosting API. Via the APIs, the application can instantiate a runspace (one instantiation of the PowerShell runtime), which runs in the application's process and is exposed as a Runspace object.[3] The state of the runspace is encased in a SessionState object. When the runspace is created, the Windows PowerShell runtime initializes the instantiation, including initializing the providers and enumerating the cmdlets, and updates the SessionState object accordingly. The Runspace then must be opened for either synchronous processing or asynchronous processing. After that it can be used to execute commands.

To execute a command, a pipeline (represented by a Pipeline object) must be created and associated with the runspace. The pipeline object is then populated with the cmdlets that make up the pipeline. For sequential operations (as in a PowerShell script), a Pipeline object is created for each statement and nested inside another Pipeline object.[3] When a pipeline is created, Windows PowerShell invokes the pipeline processor, which resolves the cmdlets into their respective assemblies (the command processor) and adds a reference to them to the pipeline, and associates them with an InputPipe, Outputpipe and ErrorOutputPipe objects, to represent the connection with the pipeline. The types are verified and parameters bound using reflection.[3] Once the pipeline is set up, the host calls the Invoke() method to run the commands, or its asynchronous equivalent - InvokeAsync(). If the pipeline has the Write-Host cmdlet at the end of the pipeline, it writes the result onto the console screen. If not, the results are handed over to the host, which might either apply further processing or display it itself.

The hosting APIs are used by Microsoft Exchange Server 2007 to provide its management GUI. Each operation exposed in the GUI is mapped to a sequence of PowerShell commands (or pipelines). The host creates the pipeline and executes them. In fact, the interactive PowerShell console itself is a PowerShell host, which interprets the scripts entered at command line and creates the necessary Pipeline objects and invokes them.

PowerShell 2.0

Windows PowerShell ISE, with multiple open PowerShell sessions (RunSpaces) in the Windows PowerShell 2.0

Microsoft released PowerShell 2.0 with Windows 7 and Windows 2008 R2. Windows PowerShell 2.0 is installed by default on Windows Server 2008 R2 (except on Core installations where it is optional) and Windows 7. [30] For older platforms it is available via the Windows Management Framework.[31] PowerShell V2 includes changes to the scripting language and hosting API, in addition to including more than 240 new cmdlets.[32][33] It's available here [34]

A non-exhaustive list of the new features included in PowerShell V2 is: [35] [36] [37]

  • PowerShell Remoting: Using WS-Management, PowerShell 2.0 allows scripts and cmdlets to be invoked on a remote machine or a large set of remote machines.
  • Background Jobs: Also called a PSJob, it allows a command sequence (script) or pipeline to be invoked asynchronously. Jobs can be run on the local machine or on multiple remote machines. An interactive cmdlet in a PSJob blocks the execution of the job until user input is provided.
  • Transactions: Enable cmdlet and developers can perform transactional operations. PowerShell 2.0 includes transaction cmdlets for starting, committing, and rolling back a PSTransaction as well as features to manage and direct the transaction to the participating cmdlet and provider operations. The PowerShell Registry provider supports transactions.
  • ScriptCmdlets: These are cmdlets written using the PowerShell scripting language. NOTE: The preferred name for script cmdlets is now Advanced Functions.
  • SteppablePipelines: This allows the user to control when the BeginProcessing(), ProcessRecord() and EndProcessing() functions of a cmdlet are called.
  • Modules: This allows script developers and administrators to organize and partition PowerShell scripts in self-contained, reusable units. Code from a module executes in its own self-contained context and does not affect the state outside of the module. Modules can define a restricted runspace environment by using a script. They have a persistent state as well as public and private members.
  • Data Language: A domain-specific subset of the PowerShell scripting language, that allows data definitions to be decoupled from the scripts and allow localized string resources to be imported into the script at runtime (Script Internationalization).
  • Script Debugging: It allows breakpoints to be set in a PowerShell script or function. Breakpoints can be set on lines, line & columns, commands and read or write access of variables. It includes a set of cmdlets to control the breakpoints via script.
  • Eventing: This feature allows listening, forwarding, and acting on management and system events. Eventing allows PowerShell hosts to be notified about state changes to their managed entities. It also enables PowerShell scripts to subscribe to ObjectEvents, PSEvents, and WmiEvents and process them synchronously and asynchronously.
  • Windows PowerShell Integrated Scripting Environment (ISE): PowerShell 2.0 includes a GUI-based PowerShell host (formerly known as Graphical Windows PowerShell) that provides integrated debugger, syntax highlighting, tab completion and up to 8 PowerShell Unicode-enabled consoles (Runspaces) in a tabbed UI, as well as the ability to run only the selected parts in a script.
  • Network File Transfer: Native support for prioritized, throttled, and asynchronous transfer of files between machines using the Background Intelligent Transfer Service (BITS).[38]
  • New Cmdlets: Including Out-GridView, which displays tabular data in the WPF GridView object.
  • New Operators: -Split, -Join, and Splatting (@) operators.
  • Exception Handling with Try-Catch-Finally: Unlike other .NET languages, this allows multiple exception types for a single catch block.
  • Nestable Here-Strings: PowerShell Here-Strings have been improved and can now nest.[39]
  • Block Comments: PowerShell 2.0 supports block comments using <# and #> as delimiters.[40]
  • New APIs: The new APIs range from handing more control over the PowerShell parser and runtime to the host, to creating and managing collection of Runspaces (RunspacePools) as well as the ability to create Restricted Runspaces which only allow a configured subset of PowerShell to be invoked. The new APIs also support participation in a Windows PowerShell managed transaction.

Comparison of cmdlets with similar commands

The following table contains a selection of the cmdlets that ship with PowerShell noting the most similar commands in other well known command line interpreters.

Windows PowerShell
(Cmdlet)
Windows PowerShell
(Alias)
cmd.exe / COMMAND.COM
(MS-DOS, Windows, OS/2, etc.)
Bash
(Unix, BSD, Linux, Mac OS X etc.)
Description
Get-ChildItem gci, dir, ls dir ls List all files / directories in the (current) directory
Get-Content gc, type, cat type cat Get the content of a file
Get-Command gcm help help List available commands
Get-Help help, man help man Help on commands
Clear-Host cls, clear cls clear Clear the screen[Note 1]
Copy-Item cpi, copy, cp copy cp Copy one or several files / a whole directory tree
Move-Item mi, move, mv move mv Move a file / a directory to a new location
Remove-Item ri, del, erase, rmdir, rd, rm del, erase, rmdir, rd rm, rmdir Delete a file / a directory
Rename-Item rni, ren, mv ren, rename mv Rename a file / a directory
Get-Location gl, pwd cd pwd Display the current directory/present working directory.
Pop-Location popd popd popd Change the current directory to the directory most recently pushed onto the stack
Push-Location pushd pushd pushd Push the current directory onto the stack
Set-Location sl, cd, chdir cd, chdir cd Change the current directory
Tee-Object tee n/a tee Pipe input to a file or variable, then pass the input along the pipeline
Write-Output echo, write echo echo Print strings, variables etc. to standard output
Get-Process gps, ps tlist,[Note 2] tasklist[Note 3] ps List all currently running processes
Stop-Process spps, kill kill,[Note 2] taskkill[Note 3] kill[Note 4] Stop a running process
Select-String n/a find, findstr grep Print lines matching a pattern
Set-Variable sv, set set env, export, set, setenv Set the value of a variable / create a variable

Notes
  1. ^ Clear-Host is implemented as a predefined PowerShell function.
  2. ^ a b Available in Windows NT4, Windows 98 Resource Kit, Windows 2000 Support Tools
  3. ^ a b Available in Windows XP Professional Edition and later
  4. ^ Also used in UNIX to send a process any signal, the "Terminate" signal is merely the default

Examples

Examples are provided first using the long-form canonical syntax and then using more terse UNIX-like and DOS-like aliases that are set up in the default configuration. For a list of all aliases, use the Get-Alias Cmdlet.

  • Stop all processes that begin with the letter p:
 PS> Get-Process p* | Stop-Process
 PS> ps p* | kill
  • Find the processes that use more than 1000 MB of memory and kill them:
 PS> Get-Process | Where-Object { $_.WS -gt 1000MB } | Stop-Process
 PS> ps | ? { $_.WS -gt 1000MB } | kill
  • Calculate the number of bytes in the files in a directory:
 PS> Get-Childitem | Measure-Object -Property Length -Sum
 PS> ls  | measure length -s
 PS> dir | measure length -s
  • Determine whether a specific process is no longer running:
 PS> $processToWatch = Get-Process Notepad
 PS> $processToWatch.WaitForExit()
 PS> (ps notepad).WaitForExit()
  • Change the case of a string from lower to upper:
 PS> 'hello, world!'.ToUpper()
  • Insert the string 'ABC' after the first character in the word 'string' to have the result 'sABCtring':
 PS> 'string'.Insert(1, 'ABC')
  • Download a specific RSS feed and show the titles of the 8 most recent entries:
 PS> $rssUrl = 'http://blogs.msdn.com/powershell/rss.aspx'
 PS> $blog = [xml](new-object System.Net.WebClient).DownloadString($rssUrl)
 PS> $blog.rss.channel.item | select title -first 8
 
 $x=new-object xml;$x.load('http://blogs.msdn.com/powershell/rss.aspx');$x.rss.channel.item%7Cselect title -f 8
  • Sets $UserProfile to the value of the UserProfile environment variable
 PS> $UserProfile = $env:UserProfile
  • Call a static method of a .Net object
 PS> [System.Math]::Sqrt(16)
 4
  • Run a command line executable with arguments:
 PS> [Array]$arguments = '-h', '15', 'www.wikipedia.com'
 PS> tracert $arguments
  • Get the serial number of a remote computer from WMI:
 PS> Get-WmiObject -ComputerName MyServer -Class Win32_BIOS | Select-Object SerialNumber
 PS> gwmi -co MyServer Win32_BIOS | select SerialNumber

File extensions

  • PS1 – Windows PowerShell shell script
  • PS1XML – Windows PowerShell format and type definitions
  • PSC1 – Windows PowerShell console file
  • PSD1 – Windows PowerShell data file (for Version 2)
  • PSM1 – Windows PowerShell module file (for Version 2)

Application support

SnapIns and hosts

Application Version Cmdlets Provider Management GUI
Exchange Server 2007 402 Yes Yes
Windows Server 2008 Yes Yes No
Microsoft SQL Server 2008 Yes Yes No
System Center Operations Manager 2007 74 Yes No
System Center Virtual Machine Manager 2007 Yes Yes Yes
System Center Data Protection Manager 2007 Yes No No
Windows Compute Cluster Server 2007 Yes Yes No
Microsoft Transporter Suite for Lotus Domino[41] 08.02.0012 47 No No
Microsoft PowerTools for Open XML[42] 1.0 33 No No
IBM WebSphere MQ[43] 6.0.2.2 44 No No
Quest Management Shell for Active Directory[44] 1.1 40 No No
Special Operations Software Specops Command[45] 1.0 Yes No Yes
VMware Infrastructure Toolkit[46] 1.5 157 No No
Internet Information Services[47] 7.0 54 Yes No
Windows 7 Troubleshooting Center[48] 6.1 Yes No Yes
Microsoft Deployment Toolkit 2010 Yes No No
NetApp Data ONTAP PowerShell Toolkit[49] 1.6 725 Yes Yes
JAMS Scheduler - Job Access & Management System[50] 5.0 38 Yes Yes

Alternative implementation

A project named Pash was attempted to create an open source and cross-platform implementation of PowerShell via the Mono framework. Pash was maintained by Igor Moochnick, written in C# and was released under the GNU General Public License. Pash development ceased in 2008 and is currently only partially complete.[51]

See also

References

  1. ^ Payette (2007). Windows PowerShell in Action. Manning. ISBN 1932394-90-7. http://www.manning.com/payette/. Retrieved 2011-02-12. 
  2. ^ Snover, Jeffrey (2008-05-25). "PowerShell and WPF: WTF". http://blogs.msdn.com/b/powershell/archive/2008/05/25/powershell-and-wpf-wtf.aspx. Retrieved 2010-10-24. 
  3. ^ a b c d e "How Windows PowerShell works". MSDN. http://msdn2.microsoft.com/en-us/library/ms714658.aspx. Retrieved 2007-11-27. 
  4. ^ "Extend Windows PowerShell With Custom Commands". MSDN. http://msdn.microsoft.com/msdnmag/issues/07/12/PowerShell/default.aspx. Retrieved 2007-11-27. 
  5. ^ Scott Lowe (January 5, 2007). "Exchange 2007: Get used to the command line". TechRepublic. http://articles.techrepublic.com.com/5100-10878_11-6147304.html. Retrieved 2007-11-28. 
  6. ^ "SQL Server Support for PowerShell!". http://blogs.msdn.com/powershell/archive/2007/11/13/sql-server-support-for-powershell.aspx. Retrieved 2007-11-28. 
  7. ^ "Common Engineering Criteria Overview". http://www.microsoft.com/cec/en/us/cec-overview.aspx#man-windows. Retrieved 2011-02-12. 
  8. ^ "Download Windows PowerShell". 2008-12-30. http://blogs.msdn.com/b/powershell/archive/2008/12/30/download-windows-powershell.aspx. Retrieved 2010-06-27. 
  9. ^ "Windows Management Framework is here!". 2009-10-27. http://blogs.msdn.com/powershell/archive/2009/10/27/windows-management-framework-is-here.aspx. Retrieved 2009-10-30. 
  10. ^ Dragan, Richard V. (April 23, 2003). "Windows Server 2003 Delivers Improvements All Around". PC Magazine. http://www.pcmag.com/article2/0,2704,1040410,00.asp. Retrieved 2007-11-02. "A standout feature here is that virtually all admin utilities now work from the command line (and most are available through telnet)." 
  11. ^ Snover, Jeffrey (August 2, 2002). "Monad Manifesto". Windows PowerShell Team. Microsoft}.. http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Components-PostAttachments/00-01-91-05-67/Monad-Manifesto-_2D00_-Public.doc. Retrieved 2002-08-09. 
  12. ^ Snover, Jeffrey (April 25, 2006). "Windows PowerShell (Monad) Has Arrived". Windows PowerShell team blog. MSDN. http://blogs.msdn.com/powershell/archive/2006/04/25/583344.aspx. Retrieved 2006-04-26. 
  13. ^ Snover, Jeffrey (November 15, 2006). "Windows PowerShell : Windows PowerShell & Windows Vista". Windows PowerShell team blog. MSDN. http://blogs.msdn.com/powershell/archive/2006/11/15/windows-powershell-windows-vista.aspx. Retrieved 2007-01-26. 
  14. ^ "Windows PowerShell v2.0 RTM download for Downlevel OSs". http://support.microsoft.com/kb/968929. 
  15. ^ Don Jones (2008). "Windows PowerShell - Rethinking the Pipeline". Microsoft TechNet. http://www.microsoft.com/technet/technetmag/issues/2007/07/PowerShell/default.aspx. Retrieved 2007-11-28. 
  16. ^ "Windows PowerShell Object Concepts". http://msdn2.microsoft.com/en-us/library/aa347685.aspx. Retrieved 2007-11-28. 
  17. ^ "How PowerShell Formatting and Outputting REALLY works". http://blogs.msdn.com/powershell/archive/2006/04/30/586973.aspx. Retrieved 2007-11-28. 
  18. ^ "More - How does PowerShell formatting really work?". http://blogs.msdn.com/powershell/archive/2006/06/21/641738.aspx. Retrieved 2007-11-28. 
  19. ^ "Windows PowerShell Extended Type System". http://msdn2.microsoft.com/en-us/library/ms714419.aspx. Retrieved 2007-11-28. 
  20. ^ a b c "Windows PowerShell Cmdlets". http://msdn2.microsoft.com/en-us/library/ms714395.aspx. Retrieved 2007-11-28. 
  21. ^ "Creating Your First Cmdlet". http://msdn2.microsoft.com/en-us/library/ms714622.aspx. Retrieved 2007-11-28. 
  22. ^ "Adding parameters That Process Command Line Input". http://msdn2.microsoft.com/en-us/library/ms714663.aspx. Retrieved 2007-11-28. 
  23. ^ "Adding parameters That Process Pipeline Input". http://msdn2.microsoft.com/en-us/library/ms714597.aspx. Retrieved 2007-11-28. 
  24. ^ "Windows PowerShell Providers". http://technet.microsoft.com/en-us/library/dd347723.aspx. Retrieved 2010-10-14. 
  25. ^ "Windows PowerShell Owner's Manual: Piping and the Pipeline in Windows PowerShell". Technet.microsoft.com. http://technet.microsoft.com/en-us/library/ee176927.aspx. Retrieved 2011-09-27. 
  26. ^ "Introduction to Windows PowerShell's Variables". http://www.computerperformance.co.uk/powershell/powershell_variables.htm. Retrieved 2007-11-28. 
  27. ^ a b "Lightweight Testing with Windows PowerShell". http://msdn.microsoft.com/msdnmag/issues/07/05/TestRun/default.aspx. Retrieved 2007-11-28. 
  28. ^ "Trap [Exception] { “In PowerShell” }". http://huddledmasses.org/trap-exception-in-powershell. Retrieved 2007-11-28. 
  29. ^ "Running Windows PowerShell Scripts". http://www.microsoft.com/technet/scriptcenter/topics/winpsh/manual/run.mspx. Retrieved 2007-11-28. 
  30. ^ PowerShell Team (2008-10-28). "PowerShell will be installed by default on Windows Server 08 R2 (WS08R2) and Windows 7 (W7)! - Windows PowerShell Blog - Site Home - MSDN Blogs". Blogs.msdn.com. http://blogs.msdn.com/powershell/archive/2008/10/28/powershell-will-be-installed-by-default-on-windows-server-08-r2-ws08r2-and-windows-7-w7.aspx. Retrieved 2011-09-27. 
  31. ^ "Microsoft Support Knowledge Base: Windows Management Framework (Windows PowerShell 2.0, WinRM 2.0, and BITS 4.0)". Support.microsoft.com. 2011-09-23. http://support.microsoft.com/kb/968929. Retrieved 2011-09-27. 
  32. ^ PowerShell Team (2008-10-29). "574 Reasons Why We Are So Proud and Optimistic About W7 and WS08R2 - Windows PowerShell Blog - Site Home - MSDN Blogs". Blogs.msdn.com. http://blogs.msdn.com/powershell/archive/2008/10/29/574-reasons-why-we-are-so-proud-and-optimistic-about-w7-and-ws08r2.aspx. Retrieved 2011-09-27. 
  33. ^ [1][dead link]
  34. ^ "Download Details - Microsoft Download Center - Windows PowerShell 2.0 and WinRM 2.0 for Windows Server 2008 (KB968930)". Microsoft.com. 2011-02-22. http://www.microsoft.com/download/en/details.aspx?id=11829. Retrieved 2011-09-27. 
  35. ^ "What's New in CTP of PowerShell 2.0". http://blogs.msdn.com/powershell/archive/2007/11/06/what-s-new-in-ctp-of-powershell-2-0.aspx. Retrieved 2007-11-28. 
  36. ^ "Windows PowerShell V2 Community Technology Preview 2 (CTP2) - releaseNotes". http://www.microsoft.com/downloads/details.aspx?FamilyId=7C8051C2-9BFC-4C81-859D-0864979FA403&displaylang=en. Retrieved 2008-05-05. [dead link]
  37. ^ "Differences between PowerShell 1.0 and PowerShell 2.0". http://activexperts.com/admin/powershell/ps1vs2/. Retrieved 2010-06-26. 
  38. ^ PowerShell Team (2008-10-14). "GoGrid Snap-in - Managing Cloud Services with PowerShell - Windows PowerShell Blog - Site Home - MSDN Blogs". Blogs.msdn.com. http://blogs.msdn.com/powershell/archive/2008/10/14/gogrid-snap-in-managing-cloud-services-with-powershell.aspx. Retrieved 2011-09-27. 
  39. ^ PowerShell Team (2008-10-17). "Emit-XML - Windows PowerShell Blog - Site Home - MSDN Blogs". Blogs.msdn.com. http://blogs.msdn.com/powershell/archive/2008/10/18/emit-xml.aspx. Retrieved 2011-09-27. 
  40. ^ PowerShell Team (2008-06-14). "Block Comments in V2 - Windows PowerShell Blog - Site Home - MSDN Blogs". Blogs.msdn.com. http://blogs.msdn.com/powershell/archive/2008/06/14/block-comments-in-v2.aspx. Retrieved 2011-09-27. 
  41. ^ "Microsoft Transporter Suite for Lotus Domino". http://www.microsoft.com/downloads/details.aspx?familyid=35fc4205-792b-4306-8e4b-0de9cce72172&displaylang=en. Retrieved 2008-03-07. 
  42. ^ "PowerTools for Open XML". http://www.codeplex.com/PowerTools. Retrieved 2008-06-20. 
  43. ^ "MO74: WebSphere MQ - Windows PowerShell Library". http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg24017698. Retrieved 2007-12-05. 
  44. ^ "PowerShell Commands for Active Directory by Quest Software". http://www.quest.com/powershell/activeroles-server.aspx. Retrieved 2008-07-02. 
  45. ^ "PowerShell Remoting through Group Policy". http://www.specopssoft.com/powershell/. Retrieved 2007-12-07. 
  46. ^ "VMware Infrastructure Toolkit for Windows". http://www.vmware.com/sdk/vitk_win/. Retrieved 2008-10-10. 
  47. ^ "Windows PowerShell : IIS7 PowerShell Provider Tech Preview 2". http://blogs.msdn.com/powershell/archive/2008/07/03/iis7-powershell-provider-tech-preview-2.aspx. Retrieved 2008-07-03. 
  48. ^ "Kudos to the Win7 Diagnostics Team". http://blogs.msdn.com/powershell/archive/2009/06/14/kudos-to-the-win7-diagnostics-team.aspx. Retrieved 2009-06-15. 
  49. ^ "Kudos to NetApp for Data ONTAP PowerShell ToolKit". http://blogs.msdn.com/b/powershell/archive/2010/06/16/kudos-to-netapp-for-data-ontap-powershell-toolkit.aspx. Retrieved 2010-06-15. 
  50. ^ "Heterogeneous Job Scheduling With PowerShell". http://blogs.msdn.com/b/powershell/archive/2007/06/28/heterogeneous-job-scheduling-with-powershell.aspx. Retrieved 2010-09-15. 
  51. ^ "igor.moochnick - Pash". Pash.sourceforge.net. http://pash.sourceforge.net/. Retrieved 2011-09-27. 

Further reading

External links


Wikimedia Foundation. 2010.

Look at other dictionaries:

  • Windows PowerShell — Windows PowerShell …   Википедия

  • Windows PowerShell — Screenshot von PowerShell 1.0 Basisdaten Entwickler Microsoft Aktuelle Version 2.0 (26 …   Deutsch Wikipedia

  • Windows Powershell — Screenshot von PowerShell 1.0 Basisdaten Entwickler: Microsoft Corporation Aktuelle Version …   Deutsch Wikipedia

  • Windows PowerShell — Capture d écran d une s …   Wikipédia en Français

  • Windows Powershell — Windows PowerShell, anciennement Microsoft Command Shell MSH , (nom de code Monad) est une interface en ligne de commande et un langage de script développé par Microsoft. Il est basé sur la programmation orientée objet et le framework Microsoft… …   Wikipédia en Français

  • Windows PowerShell — Desarrollador Microsoft Windows PowerShell Información general Lanzamiento 14 de noviembre de 2006 …   Wikipedia Español

  • Microsoft Windows PowerShell — …   Википедия

  • PowerShell — Windows PowerShell Screenshot von PowerShell 1.0 Basisdaten Entwickler: Microsoft Corporation Aktuelle Version …   Deutsch Wikipedia

  • Windows Power Shell — Windows PowerShell Screenshot von PowerShell 1.0 Basisdaten Entwickler: Microsoft Corporation Aktuelle Version …   Deutsch Wikipedia

  • PowerShell — Windows PowerShell Windows PowerShell, anciennement Microsoft Command Shell MSH , (nom de code Monad) est une interface en ligne de commande et un langage de script développé par Microsoft. Il est basé sur la programmation orientée objet et le… …   Wikipédia en Français


Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”

We are using cookies for the best presentation of our site. Continuing to use this site, you agree with this.