Using the Integrated Scripting Environment

PowerShell comes with an integrated scripting environment to ease the creation and testing of scripts and functions. The scripting environment is available in Start, All Programs, Windows PowerShell 2.0, Windows PowerShell ISE. PowerShell ISE is shown in Figure 7.2.

Figure 7.2. Viewing the “Hello World” sample from within the PowerShell-integrated scripting environment.

image

Before running any PowerShell cmdlet, make sure you have loaded the appropriate snap-in. The following code checks if SnapIn has been loaded and loads it if necessary:

image

However, if you will be running these samples from the SharePoint 2010 Management Shell, the SharePoint PowerShell snap-in will be preloaded for you, and you can bypass this step.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset