Powershell scripts for SharePoint 2010 services – ‘Stop & Start’

26 11 2009

We all now know that SharePoint 2010 is resource intensive, especially intensive with its ram usage.

I originally installed full blown SharePoint 2010 on my laptop (which has 4gb of ram) only to see most of that ram being used up and none left for visual studio to run.

I would recommend anyone who wants to install it on their workstation that only has 4gb of ram to install SharePoint Foundation instead which needs much less ram and will be fine for simple SharePoint 2010 dev or just playing around.

After I had installed it on my workstation I went on a search of some powershell scripts that I could use to stop SharePoint’s services when its not in use and start them up when needed.

It turns out Emmanuel Bergerat had created some and posted them on his blog, see here –

http://blogs.msdn.com/emberger/archive/2009/11/16/stop-and-go-with-sharepoint-2010-on-your-workstation.aspx

Thanks Emmanuel!

I have modified these scripts to work with SharePoint Foundation instead of full SharePoint Server 2010.

You can find the scripts on my SkyDrive – link at the bottom of the post.

To get them to work you will need to open them and edit the line –

‘MSSQL$SHAREPOINT’,"SQLWriter",’SQLAgent$SHAREPOINT’ | ForEach-Object

You need to change the name of the SQL Service (in my case MSSQL$SHAREPOINT) to the name matching yours. This name will depend on what your SQL instance is called, if you install SharePoint ‘standalone’ then it will most likely be the same as mine.

Run the scripts in the following order –

1. ‘Manual.ps1’ – Sets services to manual startup (Only need to run this once)

2. ‘Start.ps1’ – Starts SQL & SharePoint Foundation services

3. ‘Stop.ps1’ – Stops SQL & SharePoint Foundation services

Hope this helps! :-)

 

Link: SharePoint Foundation Powershell Scripts

About these ads

Actions

Information

One response

11 12 2009
tacticalintel

Awesome! I have been doing the same thing today. I will put a tweet out about your site.

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




Follow

Get every new post delivered to your Inbox.

%d bloggers like this: