Windows PowerShell ISE

Microsoft has provided a PowerShell host application that you can use to run commands and write, test, and debug scripts with in a graphical user interface (GUI). There are a number of ways to start it, but depending on your OS, you might not have it by default. To verify if you have it available, type PowerShell into the search box and check the results to see if Windows PowerShell ISE is returned.


Figure 1.1

If you are using Windows Server 2008, you may need to active the Windows PowerShell Integrated Scripting Environment (ISE) feature.


Figure 1.2

Once this feature is activated, you can type powershell_ise.exe in your Shell window or from the Cmd.exe console window.


Figure 1.3

 
 

Getting ISE SharePoint Ready

By default, PowerShell ISE does not load the cmdlets to allow you to use it against SharePoint. In order to correct this, we need to create or modify the PowerShell ISE profile. As with the other shell, there are several profiles to choose from. For this example, we will use the profile associated with the user account. To find out exactly what we need to add, we will take a lesson from the SharePoint 2010 Management Shell and open up the target location of the short-cut. Open up the PowerShell ISE and type:

If (!( test-path $profile ))

    {new-item –type file –path $profile –force}

psEdit $profile

This will open up a new tab. Enter in the following and save the file.

cd ‘C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions14CONFIGPOWERSHELLRegistration’

.SharePoint.ps1

Cd


Figure 1.4

You can now close the PowerShell ISE shell and reopen it. To test to see if it is working correctly, type:

Get-Help Get-SPContentDatabase


Figure 1.5

You should get results like figure 1.5 that explains the details of Get-SPContentDatabase. If not, open up the profile and check for errors. If you do not know where the profile was created, type the following into your PowerShell ISE window:

$Profile

You will notice that this variable was used when creating the PowerShell profile.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s