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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.