Home / windows system32 windowspowershell v1 0 powershell exe / Getting Started with Windows PowerShell - Wiley

Getting Started with Windows PowerShell - Wiley - windows system32 windowspowershell v1 0 powershell exe

Getting Started with Windows PowerShell - Wiley-windows system32 windowspowershell v1 0 powershell exe

Getting Started with
Windows PowerShell
If you are like me, then when you begin to look seriously at an interesting piece of software, you
like to get your hands dirty and play with it from the beginning. In this chapter, I show you how
to get started using Windows PowerShell, and I'll show you enough of the PowerShell commands
to let you begin to find your way around effectively. In the rest of the book, I help you build on
that initial knowledge so that you can use PowerShell for a wide range of useful tasks, depending
on your requirements.
Windows PowerShell, as you probably already know, is Microsoft's new command shell and
scripting language. It provides a command line environment for interactive exploration and
administration of computers, and by storing and running Windows PowerShell commands in a
script file, you can run scripts to carry out administrative tasks multiple times. Windows
PowerShell differs in detail from existing command line environments on the Windows and Unix
platforms, although it has similarities to past environments. In Chapter 3, in particular, I explain
more about the PowerShell approach, although differences from existing command shells and
scripting languages will emerge in every chapter.
Once you have had a brief taste of PowerShell, you will need to understand a little of the assump-
tions and approach that lie behind the design decisions that have made PowerShell the useful tool
that it is. In Chapter 2, I step back from using the PowerShell command line and look at the
strengths and deficiencies of some existing Microsoft approaches to system management and then,
in Chapter 3, take a look at the philosophy and practical thought that lies behind the approach
taken in Windows PowerShell.
Installing Windows PowerShell
Windows PowerShell depends on the presence of the .NET Framework 2.0. Before you install
PowerShell, you need to be sure that you have the .NET Framework 2.0 installed.
Part I: Finding Your Way Around Windows PowerShell
Installing .NET Framework 2.0
At the time of writing, the 32-bit version of the .NET Framework 2.0 runtime is available for download-
ing from www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-
If you are using 64-bit Itanium processors, download the .NET Framework 2.0 runtime from www.microsoft
lang=en. Windows PowerShell is only available on Windows Server 2003 for Itanium processors.
If you are using AMD 64-bit processors, download the runtime from www.microsoft.com/downloads/
If you are unsure whether or not you have .NET Framework 2.0 installed, navigate to C:\Windows\
Microsoft.NET\Framework (if necessary substitute another drive letter if your system drive is not
drive C:). In that folder you will find folders that contain the versions of the .NET Framework that are
installed on your machine. If you see a folder named v2.0.50727, then you have the .NET Framework
2.0 installed. The .NET Framework 2.0 SDK, which you can download separately, is useful as a source
of information on .NET 2.0 classes that you can use with PowerShell.
If you want to install the 32 bit .NET Framework 2.0 Software Development Kit
(SDK), download it from www.microsoft.com/downloads/details.aspx?
FamilyID=fe6f2099-b7b4-4f47-a244-c96d69c35dec&displaylang=en. To
install the .NET Framework 2.0 SDK, you must first install the 32-bit runtime.
There are also 64-bit versions of the .NET Framework 2.0 SDK available for down-
loading. The version of the runtime for Itanium is located at www.microsoft.com/
FB0&displaylang=en. The 64-bit version for AMD processors is located at www
Figure 1-1 shows what you would expect to see in the Framework folder on a clean install of Windows
2003 Service Pack 1 which does not have the .NET Framework 2.0 runtime installed.
4 Figure 1-1
Chapter 1: Getting Started with Windows PowerShell
Figure 1-2 shows the appearance of the Framework folder on a clean install of Windows 2003 Service
Pack 1 after the .NET Framework 2.0 runtime has been installed.
Figure 1-2
You don't need to delete the v1.0.3705 or v1.1.4322 folders. In fact, you are likely to cause problems for
applications that need earlier versions of the .NET Framework if you delete those folders. The .NET
Framework 2.0 is designed to run side by side with .NET Framework 1.0 and 1.1.
To install the .NET Framework 2.0, follow these steps.
1. Navigate in Windows Explorer to the folder where you downloaded the installer,
2. Double-click the installer. On the splash screen that opens, click Next.
3. On the EULA screen, accept the license agreement and click Install.
4. The installer then proceeds to install the .NET Framework 2.0, as shown in Figure 1-3.
5. When the installation has completed successfully, you should see a screen similar to Figure 1-4.
6. If you have Internet connectivity, click the Product Support Center link shown in Figure 1-4 to
check for any updates.

What's new in Windows 10 PowerShell? Windows 10 added new security features for PowerShell. Script Block Logging is now automatically enabled, providing better logging. Additionally, a new feature called Antimalware Scan Interface (AMSI) allows security solutions to intercept and