Introduction To Windows PowerShell In SharePoint

Introduction

This article is an introduction to Windows PowerShell for SharePoint and will answer the below questions:

  • What is STSADM?
  • What is Windows PowerShell?
  • Windows PowerShell Vs STSADM
  • What's cmdlet
  • What's the SharePoint Command Builder tool?

    • Does SharePoint Command Builder tool cover all the SharePoint cmdlets?
    • How can you use SharePoint Command Builder tool?
What's STSADM?

STSADM (SharePoint Team Server Administration) is a command-line tool to help you administer SharePoint. For more details, check Stsadm command-line tool.

What's Windows PowerShell?

Windows PowerShell is a command-line shell that provides an administrator full access to the applicable application programming interfaces (APIs).

Windows PowerShell Vs STSADM

Unlike STSADM, PowerShell

  • uses XML & Objects;
  • accepts and returns text;
  • is built on the Microsoft .NET Framework and accepts and returns .NET Framework objects;
  • accesses the file system on the computer so that you can access the registry, digital signature certificate etc.;
  • and has the ability to run against SQL Snapshots.
Note

The STSADM command-line tool has been deprecated, but it is included to support backward compatibility.

What's cmdlet?

Cmdlets are the heart-and-soul of Windows PowerShell, Microsoft's new command shell/scripting language. It's pronounced "Command-let" and it's a single function that can be used separately or combined with other cmdlets to perform complex tasks and automate administration.

Note

Cmdlets = Verbs (actions) - Nouns (objects)

EX: Get-SPSite cmdlet is consist of "Get" as the verb and "SPSite" as the Noun

What's the SharePoint Command Builder?

The SharePoint Command Builder is an HTML5 application that is designed to help IT professionals and power users learn how to use Windows PowerShell for administrative tasks. You can check it out at Windows PowerShell for SharePoint Command Builder.


Does it cover all the SharePoint cmdlets?

No, it covers the popular cmdlet only, especially for SharePoint Online and Office 365. You can use Get-Command & Get-Help in SharePoint Management Shell to list all the available cmdlets, where

  • the cmdlets of SharePoint 2010 are about +500.
  • the cmdlets of SharePoint 2013 are 774.
  • the cmdlets of SharePoint online are about 30.
How to use SharePoint Command Builder?

The SharePoint Command Builder consists of five main components:

Verbs

In short, the actions.


Nouns

The objects.


Design Surface

Design Surface consists of 6 parts,

(1) The combination of verb and noun to build command.



(2) The required parameters.



(3) The optional parameters.



(4) The cmdlet description with the output of the final command.



(5) Copy to the clipboard so as to copy the command to your PowerShell Window.
(6) "Clear Design Surface" to reset it and start a new command.

Product List

To filter your cmdlet based on your SharePoint Edition.

 Quick Steps

To build the common cmdlets quickly.

Let's now apply a practical example to add 'SharePoint solution package' to your farm.

  1. Open Windows PowerShell for SharePoint Command Builder .
  2. Select your product from the product list.
  3. Click on the required action from verbs sections that lead to automatic filter for the related objects of this action, and click Send.
  4. Click on the required object, and click Send.
  5. Now, build your cmdlet. You need to fill in all required parameter if they exist, plus fill the optional parameters as per your need.
  6. In the third area box, you can see the output, description, and link for more details and examples for this cmdlet.
  7. When you finish, you can copy your cmdlet by clicking on Copy to clipboard.
  8. When you need to build a new cmdlet you could click on Clear Design Surface.

Reference

Windows PowerShell Command Builder Getting Started Guide.

 
See Also

Use Windows PowerShell to administer SharePoint 2013.

G
M
T
 
 
Text-to-speech function is limited to 200 characters
Options: History: Help: FeedbackClose
Ebook Download
View all
Learn
View all