How to get a better SharePoint 2010 Management Shell

You can get the PowerShell_ISE instead of the default PowerShell command window. You will get such niceties as cut and paste using the standard Ctrl-C/Ctrl-V keyboard shortcuts, being able to debug, and create new scripts. To set this up, go to the Start Menu and select Properties on the SharePoint 2010 Management Shell. The following will appear:

image

Change the Target as follows:

From C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoExit  " & ' C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\\sharepoint.ps1 ' "

to C:\Windows\System32\WindowsPowerShell\v1.0\powershell_ise.exe "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\\sharepoint.ps1"

(Change paths as required)

After it starts up, hit the Run Script (F5) button to run the script.

At this point, you can work in the PowerShell_ISE

image