IT tutorials
 
Applications Server
 

Microsoft Sharepoint 2013 : Administering Sharepoint with Windows Powershell - Basic PowerShell Usage (part 1) - Listing the SharePoint Commands

12/17/2014 8:05:47 PM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

PowerShell is a huge topic to which entire books have been dedicated, and highly experienced users teach weeklong classes on PowerShell. Many of the SharePoint PowerShell cmdlets can be used as one-liners or “standalone,” so a comprehensive understanding of PowerShell is not necessarily required. That said, understanding a few PowerShell concepts in conjunction with the SharePoint cmdlets can greatly facilitate your work.

Listing the SharePoint Commands

The toughest part of using a command-line interface, whether it’s PowerShell, the old Windows CMD prompt, or a Linux bash shell, is determining which commands you can use. You can sit a drunk koala bear in front of Central Administration and it can click around long enough to figure out to do tasks like create a site collection. If you sit that same koala down in front of a PowerShell prompt you’ll get koala spittle on your keyboard but no new site collections. The learning curve to PowerShell can be steep, and discovering the right command is a big reason why.

Fortunately, PowerShell provides the Get-Command cmdlet to retrieve a list of available commands. Used in isolation, the Get-Command cmdlet will return all commands that are known to the host. Get-Command, like many commands, accepts optional parameters. Because we are interested in only the SharePoint 2013 commands, we can limit the commands displayed to just the SharePoint 2013 commands by using the optional -Module parameter. To list only SharePoint commands, execute the following command:

Get-Command -Module Microsoft.SharePoint.PowerShell

Figure 1 displays the output of the Get-Command cmdlet using the –Module parameter.

FIGURE 1

image

We mentioned earlier that all PowerShell cmdlets consist of a verb and a noun. All the nouns in the SharePoint PowerShell cmdlets start with “SP.” The Get-Command cmdlet accepts wildcards, which you can use to get a list of all the SharePoint PowerShell cmdlets in an easier-to-remember method:

Get-Command -noun sp*

At last count, more than 750 PowerShell cmdlets were included with SharePoint 2013, which is probably many more commands than you want to list, unless you are printing them out for some kind of tree-killing reference manual. As the preceding example demonstrates, you can filter the list somewhat by using the optional -noun or -verb parameter for Get-Command. For example, if you were wondering what commands work with a web application, use the following command:

Get-Command –Module Microsoft.SharePoint.PowerShell –noun SPWebApp*

Because the SharePoint module is the only module with cmdlets using the SPWebApplication noun, you would get the same results if you omitted the –module parameter. However, it’s a good idea to leave it if you’re searching by verb, as the SharePoint cmdlets use the same verbs as the non-SharePoint cmdlets. If you need to know which command to use for backups, use the following command:

Get-Command –Module Microsoft.SharePoint.PowerShell –verb Backup

Figure 2 shows how you can control the output of Get-Command with the –noun and –verb parameters.

FIGURE 2

image
 
Others
 
- Microsoft Sharepoint 2013 : Administering Sharepoint with Windows Powershell - Commands
- Microsoft Sharepoint 2013 : Microsoft SharePoint 2013 Management Shell and Other Hosts
- Microsoft Lync Server 2013 : Dependent Services and SQL - Server Certificates - Installing Lync Certificates
- Microsoft Lync Server 2013 : Dependent Services and SQL - Domain Name System - DNS Load Balancing , Automatic Client Sign-in
- Microsoft Lync Server 2013 : Dependent Services and SQL - Active Directory (part 2) - Forest Prep, Domain Prep, Lync Server 2013 Security Groups
- Microsoft Lync Server 2013 : Dependent Services and SQL - Active Directory (part 1) - Schema Extensions
- Administering Active Directory 2008 : Creating and Managing Active Directory Objects (part 4) - Moving, Renaming, and Deleting Active Directory Objects , Resetting an Existing Computer Account
- Administering Active Directory 2008 : Creating and Managing Active Directory Objects (part 3) - Understanding Groups, Filtering and Advanced Active Directory Features
- Administering Active Directory 2008 : Creating and Managing Active Directory Objects (part 2) - Managing Object Properties
- Administering Active Directory 2008 : Creating and Managing Active Directory Objects (part 1) - Overview of Active Directory Objects
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us