2

What is the difference between the three? STSADM.exe PowerShell v2.0 Management Shell

I understand you can run powershell scripts in the management shell, but I thought I remember reading that there is different access to resources in the Management Shell than in the PowerShell. I see there are two different applications for Management Shell and one for PowerShell.

Ok, now STSADM.exe. I dont understand this at all.. Its a command line tool for which Shell? Both?! I see it allows for different operations to be performed than in Central Administration. But I would like a better understanding of the tool than just that it is different for these (memorized) tasks.

1 Answer 1

6

PowerShell is Microsoft’s next-generation scripting language offering direct access to .NET objects, complex flow and structure capabilities, and an object pipeline that makes passing objects from one command to another extremely easy.

Using Powershell in SharePoint 2010, Almost every aspect can be manipulated using any of the more than 500 out-of-the-box cmdlets or by creating custom cmdlets that can be developed and deployed just like any other core SharePoint artifact.

SharePoint 2010 Management Shell is just a PowerShell instance that loads the sharepoint.ps1 script file.

STSADM is a command line tool used to administer SharePoint. It is easily extendable, allowing developers to supplement the existing 184 out-of-the-box commands with additional commands.

STSADM is still present in SharePoint 2010, but its prominence has been greatly reduced as it is extremely limited. Using STSADM, Conditional logic was difficult to achieve using batch files. If no command was available to manipulate a setting, a custom command would have to be created. And performance was poor because of the inability to re-use objects across command calls.

5
  • 1
    The credit for such crisp explanation above goes to 'GARY LAPOINTE -MVP' Nov 28, 2011 at 13:35
  • It would be usefull to note that Powershell Management Shell isn't available for SharePoint 2007, so in those days there was no option other than stsadm.exe Nov 28, 2011 at 13:49
  • @JanisVeinbergs That is NOT correct. Lack of a management shell does not prevent you from using PowerShell. The management shell just pre-loads the objects. While 2010 has more support, the root PowerShell language can still interface with 2007 very well. My team is using it to automate many of the standard 2007 admin and upgrade tasks we do for our clients. Nov 28, 2011 at 14:24
  • @MikeOryszak Sure, you can use powershell as it were programming language and so you can manage SharePoint 2007. Its just that SharePoint 2007 by default doesn't provide any powershell cmdlets as SP2010 does (you have to write for yourself if you want...). I commented this so that author could see how SharePoint evolves and who knows if stsadm.exe would be developed if powershell was available earlyer? Nov 28, 2011 at 14:33
  • Amit, this is an awesome response. Thank you for bring thorough and including some legacy as well. Essentially, the PowerShell is king.. but are there things that cannot be done in PowerShell that are only available in the Management Shell? Nov 29, 2011 at 9:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.