RSS Feed Feed your read!

Scot Hillier is an independent consultant and Microsoft SharePoint Most Valuable Professional focused on creating solutions for Information Workers with SharePoint, Office, and related .NET technologies. A frequent speaker at TechEd and SharePoint Connections, he is also the author of 10 books on Microsoft technologies including Microsoft SharePoint: Building Office 2007 Solutions in C# 2005. Scot splits his time between consulting on SharePoint projects and training for Critical Path Training. Scot is a former U. S. Navy submarine officer and graduate of the Virginia Military Institute. Scot can be reached at scot@shillier.com

Archives

January 2010 (17)
February 2010 (1)
March 2010 (1)
April 2010 (2)
May 2010 (1)
June 2010 (1)

Links

Todd Baginski's Blog
BCS Team Blog
SharePoint Team Blog
SharePoint Workspace Team Blog
Andrew Connell's Blog
Ted Pattison's Blog

Tag Cloud

Conferences, MOSS 2007 Archived Post, PowerShell, SharePoint 2010,

Setting up PowerShell ISE for SharePoint 2010 

Tags: PowerShell

PowerShell is a great companion for SharePoint 2010. As a developer, I find the best way to use it is through the Integrated Scripting Environment (ISE). The only problem is, the SharePoint snap-in doesn't load automatically when I start PowerShell ISE. So, here are the steps I follow to get ISE installed and make sure the SharePoint snap-in alwyas loads.
 
1. Open Server Manager
2. Click the Features node
3. Click the Add Features link
4. Check the box for "Windows PowerShell Integrated Scripting Environment".
5. Click Next, then Install
6. Wait until installation is complete
7. Open Powershell ISE from Programs>Accessories>PowerShell folder
8. Run the following code from the immediate window in ISE to create a new profile for all users
 
if (!(test-path $profile.AllUsersAllHosts))
{new-item -type file -path $profile.AllUsersAllHosts-force}
 
9. Run the following code to edit the new profile
 
psEdit $profile.AllUsersAllHosts
 
10. When profile1.ps1 opens, add the following code to attach the SharePoint snap-in every time PowerShell is run.
 
 If ((Get-PSSnapIn -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null )
{ Add-PSSnapIn -Name Microsoft.SharePoint.PowerShell }
 
11. Save profile.ps1 and close PowerShell ISE.
12. Start PowerShell ISE again and type the following command to verify that the SharePoint snap-in loaded. You should see SharePoint-specific command listed.
 
Get-Command Get-SP*
 
Posted by Scot Hillier on 18-Jan-10
0 Comments  |  Trackback Url  |  Link to this post | Bookmark this post with:        
 
Failed to render control: Exception of type 'System.OutOfMemoryException' was thrown.

Comments