Book Image

Instant Windows PowerShell

By : Vinith Menon
Book Image

Instant Windows PowerShell

By: Vinith Menon

Overview of this book

Windows PowerShell comprises numerous major features that extend its use, advance its usability, and allow you to control and manage Windows-based environments.Windows PowerShell is backward-compatible. Cmdlets, providers, modules, snap-ins, scripts, functions, and profiles that were designed for Windows PowerShell 2.0 work in Windows PowerShell 3.0 without any changes.A practical, hands-on guide that provides you with a number of clear step-by-step exercises which will help you take advantage of the real power that is Windows PowerShell.Starting by listing the New Features in PowerShell 3.0, this book goes on to break down the mystery and confusion that surrounds which feature to use and when. It will take you through a number of clear, practical sections that will help you to take advantage of PowerShell, easily and quickly.You will also learn how to use PowerShell for file and folder management in a Windows Server Environment. The book will also also show you how to use PowerShell Web Access for secure Windows Management anywhere, any time, on any device.Learn how to secure and sign the scripts you write using the script signing feature in PowerShell, understand how to use PowerShell to secure and administer a PKI environment, and discover how to use a BPA module to analyze the security integrity of a system as per Microsoft requirements. If you want to take your first step into PowerShell 3.0 to manage your Windows environment, then this is the book for you.
Table of Contents (7 chapters)

Installation


In the following steps, you will learn how to install and configure Windows PowerShell 3.0 and get it set up on your system.

Note that Windows PowerShell 3.0 comes preinstalled in Windows 8 and Windows Server 2012.

Step 1 – what do I need?

Before you install PowerShell 3.0, you will need to check that you have all the required elements, as follows:

  • A computer or server with a Windows 7 SP1 / 2008 SP2 / 2008R2 SP1 operating system

  • Access to the Internet

  • To use the latest version of PowerShell ISE, you would need to download, install, and configure Microsoft .NET Framework 4.0 Full from http://go.microsoft.com/fwlink/?LinkID=212547

Additionally, the following requirements apply:

  • To install the latest version of Windows PowerShell ISE for Windows PowerShell 3.0 on workstations running Windows Server 2008 R2 with Service Pack 1, before installing Windows Management Framework 3.0 RC, use Server Manager to add the Windows PowerShell ISE feature to Windows PowerShell.

  • Install the latest Windows updates before installing WMF 3.0 RC.

Step 2 – downloading and installing Windows Management Framework

Download and install the package based on your operating system version and architecture type, as shown in the following list:

  • For Windows 7 Service Pack 1, download and install the following packages:

    • For 64-bit versions: Windows6.1-KB2506143-x64.msu

    • For 32-bit versions: Windows6.1-KB2506143-x86.msu

  • For Windows Server 2008 R2 SP1, download and install the following package:

    • For 64-bit versions: Windows6.1-KB2506143-x64.msu

  • For Windows Server 2008 Service Pack 2, download and install the following packages:

    • For 64-bit versions: Windows6.0-KB2506146-x64.msu

    • For 32-bit versions: Windows6.0-KB2506146-x86.msu

Now to get these packages, you need to head over to the Microsoft Download Center at http://www.microsoft.com/en-us/download/default.aspx in your web browser and search for Windows Management Framework 3.0-RC, as shown in the following screenshot:

Next, click on the downloading icon for Windows Management Framework 3.0 - RC and initiate downloading of the Windows Management Framework 3.0 release notes document:

Close all instances of PowerShell hosts. Also, uninstall any previous builds of WMF 3.0, if installed.

Download and install the package applicable to your operating system version.

Step 3 – verifying that you have PowerShell v3 installed

Open a PowerShell window and type in the following:

PS C:\Windows\system32> $PSVersionTable

You will see that PSVersion (PowerShell version) now shows 3.0:

And that's it

It's really that easy. You just need to install and configure Windows Management Framework 3.0 to get going with Windows PowerShell V3.

Note

It's still possible to get back to PowerShell V2 if needed.

The parameter to launch the PowerShell executable is PS C:\Windows\system32> powershell.exe -version 2.