Appendix: Common Cmdlets

This appendix gives a brief overview of the various PowerShell cmdlets we covered in this book and some other useful cmdlets, along with examples of how to use them.

Set-SPServer

Sets the role in the SharePoint 2016 farm:

Set-SPServer -Identity <server name> -Role <server role>

Get-SPFarmConfig

Returns a global property or a collection of global properties for the local farm:

Get-SPFarmConfig [-AssignmentCollection <SPAssignmentCollection>] [-ServiceConnectionPoint <SwitchParameter>]

Set-SPPassPhrase

Sets the passphrase to a new value:

Set-SPPassPhrase -ConfirmPassPhrase <SecureString> -PassPhrase <SecureString> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] ...

Get Beginning PowerShell for SharePoint 2016: A Guide for Administrators, Developers, and DevOps Engineers, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.