programming4us
 
Applications Server
 

Microsoft Sharepoint 2013 : Using SharePoint Commands (part 1) - Working with the Farm, Working with the Farm Configuration

1/14/2015 8:26:46 PM

As mentioned earlier, there are more than 750 individual SharePoint 2013 commands. This section will get you started working with some of the more common SharePoint commands for PowerShell.

Working with the Farm

The highest-level SharePoint administration object is the farm, which contains many key properties, methods, and collections associated with the SharePoint farm. You can access many of the farm’s properties using a specific SharePoint 2013 command.

For example, you can determine the farm’s status, display name, and version by using the Get-SPFarm command . The output of this command is nothing special. The default output for the SPFarm object is to display the Status and DisplayName. However, you learned earlier how to use Format-List to control formatting of the objects You can also pipe the output of Get-SPFarm through the Select-Object cmdlet to display specific properties so feel free to modify the output of the SPFarm object. To add the BuildVersion column to the output, use the following command:

Get-SPFarm | Select-Object DisplayName, Status, BuildVersion

To access an individual property on the SPFarm object, use dot notation (.). You could also do this using a variable, but that has its own complications. For example, to access the BuildVersion property of the SPFarm object, use the following command:

(Get-SPFarm).BuildVersion

The parentheses specify that you want the BuildVersion property of the result of the Get-SPFarm command. The result of the Get-SPFarm command is an SPFarm object. Without the parentheses, PowerShell would interpret your command as “get the BuildVersion property of the Get-SPFarm command,” which does not have a BuildVersion property. Figure 1 shows the result.

FIGURE 1

image

There are quite a few methods for the SPFarm object, such as backup and restore, but we won’t cover any of these because SharePoint includes specific cmdlets for many of these methods. There’s not much point spending time learning how to work with the object model when you can simply run a command that works more closely with the features you are trying to leverage.

Working with the Farm Configuration

This section touches on two useful farm configuration commands. The Get-SPFarmConfig command returns farm-level configuration information for items that are not on the SPFarm object. Figure 2 displays example output of the Get-SPFarmConfig command.

FIGURE 2

image

You can use the corresponding Set-SPFarmConfig command to modify the values. It is a little bit more involved than a single command. You need to get the FarmConfig into a variable, change the value of the property, and then pipe the modified FarmConfig variable to the Set-SPFarmConfig command. Figure 3 shows example output.

FIGURE 3

image

The commands in Figure 3 modify the farm’s WorkFlowBatchSize property, which determines how many workflows can be processed at one time by the farm. The default value is 100. In this case, the setting is changed to 105 and the value is written back to the farm.

 
Others
 
- Microsoft LynServer 2013 : Dependent Services and SQL - Office Web Apps Server
- Microsoft LynServer 2013 : Dependent Services and SQL - Network Dependencies (part 2) - Defining Network Sites
- Microsoft LynServer 2013 : Dependent Services and SQL - Network Dependencies (part 1) - Supporting Lync Phone Edition with DHCP
- Microsoft Exchange Server 2013 : Designing a Successful Exchange Storage Solution (part 3) - Selecting the Right Storage Hardware, Storage Validation Using Jetstress
- Microsoft Exchange Server 2013 : Designing a Successful Exchange Storage Solution (part 2) - Making Sense of the Exchange Mailbox Server Role Requirements Calculator
- Microsoft Exchange Server 2013 : Designing a Successful Exchange Storage Solution (part 1) - Requirements Gathering
- Microsoft Exchange Server 2013 : Designing a Successful Exchange Storage Solution - Storage Improvements in Exchange Server 2013
- Microsoft Exchange Server 2013 : Designing a Successful Exchange Storage Solution - Storage Changes in Exchange 2013
- Microsoft Exchange Server 2013 : Designing a Successful Exchange Storage Solution - A Brief History of Exchange Storage
- Microsoft Sharepoint 2013 : Federated Authentication (part 4) - Active Directory Federated Services - Configuring a Relying Party in ADFS
 
 
REVIEW
 
- First look: Apple Watch

- 10 Amazing Tools You Should Be Using with Dropbox

- Sigma 24mm f/1.4 DG HSM Art

- Canon EF11-24mm f/4L USM

- Creative Sound Blaster Roar 2

- Alienware 17 - Dell's Alienware laptops

- Smartwatch : Wellograph

- Xiaomi Redmi 2
 
VIDEO TUTORIAL
 
- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 1)

- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 2)

- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 3)
 
Popular tags
 
Video Tutorail Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS
 
Top 10
 
- Setup Free Media Server To Stream Videos To DLNA Compatible TV, Xbox 360 & PS3 (Play Station 3)
- How To Install Android Market & Google Apps On Kindle Fire
- How To Make Ubuntu Look Like Windows 7
- How To Add A New Account in MS Outlook 2013
- Get Android & Mac OS X Style Gadgets For Windows 7 & Windows 8 With XWidget
- How To Activate Microsoft Office 2013
- How To Install Actual Facebook App On Kindle Fire
- How To Create, View And Edit Microsoft Office Files On Kindle Fire
- Download Attractive Business PowerPoint Templates For Free At SlideHunter
- How To Use And Enable Hibernate & Sleep Mode In Windows 8