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:

However, if you will be running these samples from the SharePoint ...

Get Microsoft SharePoint 2010 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.