SharePointRoot

STSADM – Make It Easy…!

2 Comments

For SharePoint developers, the use of the STSADM command has NOT gone away with SharePoint 2010 – interesting to note that it’s still called STSADM – as in SharePoint Team Services – a throw-back to the old SharePoint 2001 days (!)

Yes, I’m aware that PowerShell does much of the same stuff, but there’s still a need for STSADM – and this ‘tip’ is for SharePoint 2007 – and 2010 alike.

How many times have you had to do this (for example) :

"C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\STSADM.EXE” –o enumsolutions

*phew*

It’s such a loooong path to have to either :

  1. Type it in manually – who does that ?!!?
  2. Navigate with Windows Explorer – and then copy the path (address bar) to a Command Prompt (DOS) window

Short Command

Here’s a quick tip – so that you only need to type STSADM :

STSADM.EXE –o enumsolutions

Add the path to ENV variables

What you need to do is add the big looong path to the server ‘environment variables’ – these are the steps for Windows Server 2008 (much the same for 2003) :

  • Click Start – and then just type “SYS VAR”    (without quotes)
  • The Windows start menu will show the items that match – from Control Panel
  • Click the item shown – which is “Edit the system environment variables”

image

  • Click on the button for ‘Environment Variables’

image

  • Scroll down the SECOND list box – with the System Variables
  • Click on the variable called Path – and click Edit

image

  • Then paste in the PATH to the SharePoint Root folder (BIN)
  • IMPORTANT : Don’t REPLACE the current PATH value – just append to the tail
  • Make sure you include a semi-colon between the previous value
  • AND – make sure you wrap it with quotes – as there are spaces in the value

image

  • For SharePoint 2007 :
            • ;"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\"
  • For SharePoint 2010 :
            • ;"C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN\"
  • Click OK – and then OK again – and once more – basically just need OK your way outta there…

And – that’s it – you can now just type STSADM instead of needing the entire PATH to the BIN folder.

:-)

** NB. You’ll need to close and re-open the Command Window – if you already have one open.   The Environment Variables are re-loaded when each NEW Command Window is opened.

About these ads

2 thoughts on “STSADM – Make It Easy…!

  1. Pingback: STSADM ShortCut for SP2010 « All About SharePoint

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.

Join 30 other followers