MS PowerShell -
Prerequisite Efficiency for Administrative Tasks
The MS Windows 7 operating system comes with Windows PowerShell 2.0. MS Windows
PowerShell is a command-line shell and scripting language for performing system
administration tasks on MS Windows operating systems and the applications that
run on the MS Windows operating system. Built on the Microsoft .NET Framework,
command tools, known as cmdlets, provide the ability to manage the computers in
an enterprise from the command line.
|
 |
MS Windows PowerShell provides access to data
stores, such as the registry and the certificate store. Windows PowerShell also
has full support for all WMI: Windows Management Instrumentation classes. PowerShell
is extensible; in addition to the standard system provided cmdlets, there is the
capability to create cmdlets, providers, functions, and scripts which can then be
packaged into modules to be shared with other users. There are also other
cmdlets, providers, and tools that can be added to the MS Windows PowerShell:
Active Directory Domain Services, Windows BitLockerlM Drive Encryption, DHCP
Server service, Group Policy, Remote Desktop Services, and Windows Server
Backup.
The WMI-based remoting features of Windows
PowerShell require no configuration and runs on all versions of Windows that
support Windows PowerShell. The WS-Management-based remoting features require both
the local and remote computers to run Windows Vista or a later version of Windows. It
is also necessary to enable and configure WS-Management on all participating
computers. Several cmdlets work only when the current user is a member of
the Administrators group on the computer or when the current user can
provide the credentials of a member of the Administrators group.
MS PowerShell, like UNIX/Linux based
shells, implements a pipeline which 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: 1- the Sort-Object cmdlet which sorts the objects by
handle count, 2- the Where-Object which filters any process that has fewer
then 1 MB of paged memory, and 3- the Select-Object cmdlet to select the
first10 processes based on handle count. There are differences between
what MS PowerShell and UNIX/Linux passes between stages in the pipeline. In
UNIX, the output of one command is piped to the next stage of the pipeline
typically as raw text. With PowerShell, the pipeline consists of .NET
objects. The use of objects eliminates the need to parse arbitrary text
output from one command to extract data since all objects export a
consistent interface.
The new features, resources, and capabilities which are available
in MS PowerShell on the Windows 7 operating system are:
| Feature |
Description |
| New cmdlets |
There are more than 100 new
cmdlets, including Get Hotfix, Send-MailMessage, Get-ComputerRestorePoint,
New-WebServiceProxy, Debug-Process, Add-Computer, Rename-Computer,
Reset-ComputerMachinePassword, and Get-Random. |
| Remote management |
Commands can be run on one
computer or hundreds of computers with a single command. An
interactive session can be established with a single computer. A
session can be established which will receive remote commands from
multiple computers. |
| ISE: Integrated Scripting
Environment |
Windows PowerShell SE is a
graphical user interface for Windows PowerShell that provides the
capability to run commands, and write, edit, run, test, and debug
scripts in the same window. It can provide up to eight independent
execution environments and includes a built-in debugger, multiline
editing, selective execution, syntax colors, line and column
numbers, and context-sensitive Help. |
| Background Jobs |
There is the capability to run
commands asynchronously and in the background while continuing to
work in a session. Background jobs can be run on a local or remote
computer and the results can be stored locally or remotely. |
| Debugger |
The Windows PowerShell
debugger will help in debugging functions and scripts. It provides
the capability to set and remove breakpoints, step through code,
check the values of variables, and display a call-stack trace. |
| Modules |
MS Windows PowerShell modules
provide the capability to organize MS Windows PowerShell scripts and
functions into independent, self-contained units. Cmdlets,
providers, scripts, functions, and other files can be packaged into
modules for distribution to other users. Modules are easier for
users to install and use than Windows PowerShell snap-ins. Modules
can include any type of file, including audio files, images, Help
files, and icons. Modules run in a separate session to avoid name
conflicts. |
| Transactions |
There is now support for
transactions, which provides the capability to manage a set of
commands as a logical unit. A transaction can be committed, or it
can be completely undone in order that the affected data is not
changed by the transaction. |
| Events |
There is a new event
infrastructure for creating events, subscribing to system and
application events, and then listening, forwarding, and acting on
the events synchronously and asynchronously. |
| Advanced functions |
Advanced functions behave
identically to cmdlets, but they are written in the Windows
PowerShell scripting language instead of in C#. |
| Script internationalization |
Scripts and functions can
display messages and Help text to users in multiple languages. |
| Online Help |
In addition to Help at the
command line, the Get-Help cmdlet has a new Online parameter that
opens a complete and updated version of each Help topic on Microsoft
TechNet. |
SYS-ED staff and CETi Technology Partners are evaluating Microsoft support and websites.
| Website |
Description |
| Windows PowerShell Technology
Center |
Provides an entry point for
Windows PowerShell documentation, such as information about
deployment, operations, training, support, and communities. |
| Windows PowerShell blog |
Blogs that includes
information about current Windows PowerShell developments, best
practices, and other resources. |
| Group Policy Technology Center |
Provides Group Policy
documentation, such as information about deployment, operations,
training, support, and communities. |
| Group Settings Reference |
Lists the Group Policy
settings described in the ADMX administrative template files and
security settings. This spreadsheet includes all administrative
template policy settings for Windows Server 2008 R2 and Windows
Vista. |
|