Skip to content

Latest commit

 

History

History
381 lines (379 loc) · 35.2 KB

readme.md

File metadata and controls

381 lines (379 loc) · 35.2 KB

Cmdlet Documentation

Below you can find a list of all the available cmdlets. Many commands provide built-in help and examples. Retrieve the detailed help with

Get-Help Connect-PnPOnline -Detailed

Apps

Cmdlet Description Platforms
Add‑PnPApp Add/uploads an available app to the app catalog SharePoint Online
Get‑PnPApp Returns the available apps from the app catalog SharePoint Online
Install‑PnPApp Installs an available app from the app catalog SharePoint Online
Publish‑PnPApp Publishes/Deploys/Trusts an available app in the app catalog SharePoint Online
Remove‑PnPApp Removes an app from the app catalog SharePoint Online
Uninstall‑PnPApp Uninstalls an available add-in from the site All
Unpublish‑PnPApp Unpublishes/retracts an available add-in from the app catalog SharePoint Online
Update‑PnPApp Updates an available app from the app catalog SharePoint Online
Get‑PnPAppInstance Returns a SharePoint AddIn Instance All
Uninstall‑PnPAppInstance Removes an app from a site All
Import‑PnPAppPackage Adds a SharePoint Addin to a site All

Base Cmdlets

Cmdlet Description Platforms
Get‑PnPAppAuthAccessToken Returns the access token All
Get‑PnPAuthenticationRealm Returns the authentication realm All
Get‑PnPAzureADManifestKeyCredentials Return the JSON Manifest snippet for Azure Apps All
Get‑PnPConnection Returns the current context All
Get‑PnPContext Returns the current context All
Set‑PnPContext Set the ClientContext All
Get‑PnPHealthScore Retrieves the healthscore All
Connect‑PnPOnline Connect to a SharePoint site All
Disconnect‑PnPOnline Disconnects the context All
Get‑PnPProperty Returns a previously not loaded property of a ClientObject All
Execute‑PnPQuery Execute the current queued actions All
Get‑PnPStoredCredential Get a credential All
Set‑PnPTraceLog Turn log tracing on or off All

Branding

Cmdlet Description Platforms
Add‑PnPCustomAction Adds a custom action All
Get‑PnPCustomAction Return user custom actions All
Remove‑PnPCustomAction Removes a custom action All
Get‑PnPHomePage Return the homepage All
Set‑PnPHomePage Sets the home page of the current web. All
Add‑PnPJavaScriptBlock Adds a link to a JavaScript snippet/block to a web or site collection All
Add‑PnPJavaScriptLink Adds a link to a JavaScript file to a web or sitecollection All
Get‑PnPJavaScriptLink Returns all or a specific custom action(s) with location type ScriptLink All
Remove‑PnPJavaScriptLink Removes a JavaScript link or block from a web or sitecollection All
Get‑PnPMasterPage Returns the URLs of the default Master Page and the custom Master Page. All
Set‑PnPMasterPage Set the masterpage All
Set‑PnPMinimalDownloadStrategy Activates or deactivates the minimal downloading strategy. All
Add‑PnPNavigationNode Adds an item to a navigation element All
Remove‑PnPNavigationNode Removes a menu item from either the quicklaunch or top navigation All
Disable‑PnPResponsiveUI Deactive the PnP Response UI add-on All
Enable‑PnPResponsiveUI Activates the PnP Response UI Add-on All
Get‑PnPTheme Returns the current theme/composed look of the current web. All
Set‑PnPTheme Sets the theme of the current web. All

Client-Side Pages

Cmdlet Description Platforms
Get‑PnPAvailableClientSideComponents Gets the available client side components on a particular page SharePoint Online
Move‑PnPClientSideComponent Moves a Client-Side Component to a different section/column SharePoint Online
Add‑PnPClientSidePage Adds a Client-Side Page SharePoint Online
Get‑PnPClientSidePage Gets a Client-Side Page SharePoint Online
Remove‑PnPClientSidePage Removes a Client-Side Page SharePoint Online
Set‑PnPClientSidePage Sets parameters of a Client-Side Page SharePoint Online
Add‑PnPClientSidePageSection Adds a new section to a Client-Side page SharePoint Online
Add‑PnPClientSideText Adds a text element to a client-side page. SharePoint Online
Add‑PnPClientSideWebPart Adds a Client-Side Web Part to a client-side page SharePoint Online

Content Types

Cmdlet Description Platforms
Add‑PnPContentType Adds a new content type All
Get‑PnPContentType Retrieves a content type All
Remove‑PnPContentType Removes a content type from a web All
Remove‑PnPContentTypeFromList Removes a content type from a list All
Get‑PnPContentTypePublishingHubUrl Returns the url to Content Type Publishing Hub All
Add‑PnPContentTypeToList Adds a new content type to a list All
Set‑PnPDefaultContentTypeToList Sets the default content type for a list All
Remove‑PnPFieldFromContentType Removes a site column from a content type All
Add‑PnPFieldToContentType Adds an existing site column to a content type All

Diagnostic utilites

Cmdlet Description Platforms
Measure‑PnPList Returns statistics on the list object SharePoint Online, SharePoint 2016
Measure‑PnPResponseTime Measures response time for the specified endpoint by sending probe requests and gathering stats. All
Measure‑PnPWeb Returns statistics on the web object SharePoint Online, SharePoint 2016

Document Sets

Cmdlet Description Platforms
Remove‑PnPContentTypeFromDocumentSet Removes a content type from a document set All
Add‑PnPContentTypeToDocumentSet Adds a content type to a document set All
Add‑PnPDocumentSet Creates a new document set in a library. All
Set‑PnPDocumentSetField Sets a site column from the available content types to a document set All
Get‑PnPDocumentSetTemplate Retrieves a document set template All

Event Receivers

Cmdlet Description Platforms
Add‑PnPEventReceiver Adds a new remote event receiver All
Get‑PnPEventReceiver Return registered eventreceivers All
Remove‑PnPEventReceiver Remove an eventreceiver All

Features

Cmdlet Description Platforms
New‑PnPExtensbilityHandlerObject Creates an ExtensibilityHandler Object, to be used by the Get-SPOProvisioningTemplate cmdlet All
Disable‑PnPFeature Disables a feature All
Enable‑PnPFeature Enables a feature All
Get‑PnPFeature Returns all activated or a specific activated feature All

Fields

Cmdlet Description Platforms
Add‑PnPField Add a field All
Get‑PnPField Returns a field from a list or site All
Remove‑PnPField Removes a field from a list or a site All
Set‑PnPField Changes one or more properties of a field in a specific list or for the whole web All
Add‑PnPFieldFromXml Adds a field to a list or as a site column based upon a CAML/XML field definition All
Add‑PnPTaxonomyField Add a taxonomy field All
Set‑PnPView Change view properties All

Files and Folders

Cmdlet Description Platforms
Add‑PnPFile Uploads a file to Web All
Copy‑PnPFile Copies a file or folder to a different location All
Find‑PnPFile Finds a file in the virtual file system of the web. All
Get‑PnPFile Downloads a file. All
Move‑PnPFile Moves a file to a different location All
Remove‑PnPFile Removes a file. All
Rename‑PnPFile Renames a file in its current location All
Set‑PnPFileCheckedIn Checks in a file All
Set‑PnPFileCheckedOut Checks out a file All
Add‑PnPFolder Creates a folder within a parent folder All
Ensure‑PnPFolder Returns a folder from a given site relative path, and will create it if it does not exist. All
Get‑PnPFolder Return a folder object All
Move‑PnPFolder Move a folder to another location in the current web All
Remove‑PnPFolder Deletes a folder within a parent folder All
Rename‑PnPFolder Renames a folder All
Get‑PnPFolderItem List content in folder All
Copy‑PnPItemProxy Proxy cmdlet for using Copy-Item between SharePoint provider and FileSystem provider All
Move‑PnPItemProxy Proxy cmdlet for using Move-Item between SharePoint provider and FileSystem provider All

Information Management

Cmdlet Description Platforms
Get‑PnPSiteClosure Get the site closure status of the site which has a site policy applied All
Set‑PnPSiteClosure Opens or closes a site which has a site policy applied All
Set‑PnPSitePolicy Sets a site policy All
Get‑PnPSitePolicy Retrieves all or a specific site policy All

Lists

Cmdlet Description Platforms
Get‑PnPDefaultColumnValues Gets the default column values for all folders in document library All
Set‑PnPDefaultColumnValues Sets default column values for a document library All
Get‑PnPList Returns a List object All
New‑PnPList Creates a new list All
Remove‑PnPList Deletes a list All
Set‑PnPList Updates list settings All
Add‑PnPListItem Adds an item to a list All
Get‑PnPListItem Retrieves list items All
Remove‑PnPListItem Deletes an item from a list All
Set‑PnPListItem Updates a list item All
Set‑PnPListItemPermission Sets list item permissions All
Move‑PnPListItemToRecycleBin Moves an item from a list to the Recycle Bin All
Set‑PnPListPermission Sets list permissions All
Get‑PnPProvisioningTemplateFromGallery Retrieves or searches provisioning templates from the PnP Template Gallery All
Request‑PnPReIndexList Marks the list for full indexing during the next incremental crawl All
Add‑PnPView Adds a view to a list All
Get‑PnPView Returns one or all views from a list All
Remove‑PnPView Deletes a view from a list All

Microsoft Graph

Cmdlet Description Platforms
Connect‑PnPMicrosoftGraph Connect to the Microsoft Graph All
Add‑PnPSiteClassification Adds one ore more site classification values to the list of possible values. Requires a connection to the Microsoft Graph. SharePoint Online
Disable‑PnPSiteClassification Disables Site Classifications for the tenant. Requires a connection to the Microsoft Graph. SharePoint Online
Enable‑PnPSiteClassification Enables Site Classifications for the tenant. Requires a connection to the Microsoft Graph. SharePoint Online
Get‑PnPSiteClassification Returns the defined Site Classifications for the tenant. Requires a connection to the Microsoft Graph. SharePoint Online
Remove‑PnPSiteClassification Removes one or more existing site classification values from the list of available values. Requires a connection to the Microsoft Graph SharePoint Online
Update‑PnPSiteClassification Updates Site Classifications for the tenant. Requires a connection to the Microsoft Graph. SharePoint Online
Get‑PnPUnifiedGroup Gets one Office 365 Group (aka Unified Group) or a list of Office 365 Groups SharePoint Online
New‑PnPUnifiedGroup Creates a new Office 365 Group (aka Unified Group) SharePoint Online
Remove‑PnPUnifiedGroup Removes one Office 365 Group (aka Unified Group) or a list of Office 365 Groups SharePoint Online
Set‑PnPUnifiedGroup Sets Office 365 Group (aka Unified Group) properties SharePoint Online
Get‑PnPUnifiedGroupMembers Gets members of a paricular Office 365 Group (aka Unified Group) SharePoint Online
Get‑PnPUnifiedGroupOwners Gets owners of a paricular Office 365 Group (aka Unified Group) SharePoint Online

Provisioning

Cmdlet Description Platforms
Add‑PnPDataRowsToProvisioningTemplate Adds datarows to a list inside a PnP Provisioning Template All
Remove‑PnPFileFromProvisioningTemplate Removes a file from a PnP Provisioning Template All
Add‑PnPFileToProvisioningTemplate Adds a file to a PnP Provisioning Template All
Convert‑PnPFolderToProvisioningTemplate Creates a pnp package file of an existing template xml, and includes all files in the current folder All
Add‑PnPListFoldersToProvisioningTemplate Adds folders to a list in a PnP Provisioning Template All
Apply‑PnPProvisioningTemplate Applies a provisioning template to a web All
Convert‑PnPProvisioningTemplate Converts a provisioning template to an other schema version All
Get‑PnPProvisioningTemplate Generates a provisioning template from a web All
Load‑PnPProvisioningTemplate Loads a PnP file from the file systems All
New‑PnPProvisioningTemplate Creates a new provisioning template object All
Save‑PnPProvisioningTemplate Saves a PnP file to the file systems All
New‑PnPProvisioningTemplateFromFolder Generates a provisioning template from a given folder, including only files that are present in that folder All
Set‑PnPProvisioningTemplateMetadata Sets metadata of a provisioning template All

Publishing

Cmdlet Description Platforms
Set‑PnPAvailablePageLayouts Sets the available page layouts for the current site All
Set‑PnPDefaultPageLayout Sets a specific page layout to be the default page layout for a publishing site All
Add‑PnPHtmlPublishingPageLayout Adds a HTML based publishing page layout All
Add‑PnPMasterPage Adds a Masterpage All
Add‑PnPPublishingImageRendition Adds an Image Rendition if the Name of the Image Rendition does not already exist. This prevents creating two Image Renditions that share the same name. All
Get‑PnPPublishingImageRendition Returns all image renditions or if Identity is specified a specific one All
Remove‑PnPPublishingImageRendition Removes an existing image rendition All
Add‑PnPPublishingPage Adds a publishing page All
Add‑PnPPublishingPageLayout Adds a publishing page layout All
Add‑PnPWikiPage Adds a wiki page All
Remove‑PnPWikiPage Removes a wiki page All
Get‑PnPWikiPageContent Gets the contents/source of a wiki page All
Set‑PnPWikiPageContent Sets the contents of a wikipage All

Records Management

Cmdlet Description Platforms
Set‑PnPInPlaceRecordsManagement Activates or deactivates in the place records management feature. All
Disable‑PnPInPlaceRecordsManagementForSite Disables in place records management for a site. All
Enable‑PnPInPlaceRecordsManagementForSite Enables in place records management for a site. All
Clear‑PnPListItemAsRecord Undeclares a list item as a record SharePoint Online
Set‑PnPListItemAsRecord Declares a list item as a record SharePoint Online
Test‑PnPListItemIsRecord Checks if a list item is a record SharePoint Online

Search

Cmdlet Description Platforms
Get‑PnPSearchConfiguration Returns the search configuration All
Set‑PnPSearchConfiguration Sets the search configuration All
Submit‑PnPSearchQuery Executes an arbitrary search query against the SharePoint search index All
Get‑PnPSiteSearchQueryResults Executes a search query to retrieve indexed site collections All

SharePoint Recycle Bin

Cmdlet Description Platforms
Clear‑PnPRecycleBinItem Permanently deletes all or a specific recycle bin item All
Get‑PnPRecycleBinItem Returns the items in the recycle bin from the context All
Move‑PnPRecycleBinItem Moves all items or a specific item in the first stage recycle bin of the current site collection to the second stage recycle bin SharePoint Online
Restore‑PnPRecycleBinItem Restores the provided recycle bin item to its original location All
Get‑PnPTenantRecycleBinItem Returns the items in the tenant scoped recycle bin SharePoint Online

SharePoint WebHooks

Cmdlet Description Platforms
Add‑PnPWebhookSubscription Adds a new Webhook subscription SharePoint Online
Remove‑PnPWebhookSubscription Removes a Webhook subscription from the resource SharePoint Online
Set‑PnPWebhookSubscription Updates a Webhook subscription SharePoint Online
Get‑PnPWebhookSubscriptions Gets all the Webhook subscriptions of the resource SharePoint Online

Sites

Cmdlet Description Platforms
Set‑PnPAppSideLoading Enables the App SideLoading Feature on a site All
Get‑PnPAuditing Get the Auditing setting of a site All
Set‑PnPAuditing Set Auditing setting for a site All
Add‑PnPOffice365GroupToSite Groupifies a classic team site by creating a group for it and connecting the site with the newly created group SharePoint Online
Get‑PnPSite Returns the current site collection from the context. All
Set‑PnPSite Sets Site Collection properties. SharePoint Online
Add‑PnPSiteCollectionAdmin Adds one or more users as site collection administrators to the site collection in the current context All
Get‑PnPSiteCollectionAdmin Returns the current site collection administrators of the site colleciton in the current context All
Remove‑PnPSiteCollectionAdmin Removes one or more users as site collection administrators from the site collection in the current context All
Install‑PnPSolution Installs a sandboxed solution to a site collection. WARNING! This method can delete your composed look gallery due to the method used to activate the solution. We recommend you to only to use this cmdlet if you are okay with that. All
Uninstall‑PnPSolution Uninstalls a sandboxed solution from a site collection All

Taxonomy

Cmdlet Description Platforms
Get‑PnPSiteCollectionTermStore Returns the site collection term store All
Export‑PnPTaxonomy Exports a taxonomy to either the output or to a file. All
Import‑PnPTaxonomy Imports a taxonomy from either a string array or a file All
Set‑PnPTaxonomyFieldValue Sets a taxonomy term value in a listitem field All
Get‑PnPTaxonomyItem Returns a taxonomy item All
Remove‑PnPTaxonomyItem Removes a taxonomy item All
Get‑PnPTaxonomySession Returns a taxonomy session All
Get‑PnPTerm Returns a taxonomy term All
New‑PnPTerm Creates a taxonomy term All
Get‑PnPTermGroup Returns a taxonomy term group All
New‑PnPTermGroup Creates a taxonomy term group All
Remove‑PnPTermGroup Removes a taxonomy term group and all its containing termsets All
Import‑PnPTermGroupFromXml Imports a taxonomy TermGroup from either the input or from an XML file. All
Export‑PnPTermGroupToXml Exports a taxonomy TermGroup to either the output or to an XML file. All
Get‑PnPTermSet Returns a taxonomy term set All
Import‑PnPTermSet Imports a taxonomy term set from a file in the standard format. All
New‑PnPTermSet Creates a taxonomy term set All

Tenant Administration

Cmdlet Description Platforms
Get‑PnPAccessToken Returns the current OAuth Access token All
New‑PnPSite BETA: This cmdlet is using early release APIs. Notice that functionality and parameters can change. Creates a new site collection SharePoint Online
Add‑PnPSiteDesign Creates a new Site Design on the current tenant. SharePoint Online
Get‑PnPSiteDesign Retrieve Site Designs that have been registered on the current tenant. SharePoint Online
Remove‑PnPSiteDesign Removes a Site Design SharePoint Online
Set‑PnPSiteDesign Updates a Site Design on the current tenant. SharePoint Online
Get‑PnPSiteDesignRights Returns the principals with design rights on a specific Site Design SharePoint Online
Grant‑PnPSiteDesignRights Grants the specified principals rights to use the site design. SharePoint Online
Revoke‑PnPSiteDesignRights Revokes the specified principals rights to use the site design. SharePoint Online
Add‑PnPSiteScript Creates a new Site Script on the current tenant. SharePoint Online
Get‑PnPSiteScript Retrieve Site Scripts that have been registered on the current tenant. SharePoint Online
Remove‑PnPSiteScript Removes a Site Script SharePoint Online
Set‑PnPSiteScript Updates an existing Site Script on the current tenant. SharePoint Online
Get‑PnPStorageEntity Retrieve Storage Entities / Farm Properties. SharePoint Online
Remove‑PnPStorageEntity Remove Storage Entities / Farm Properties. SharePoint Online
Set‑PnPStorageEntity Set Storage Entities / Farm Properties. SharePoint Online
Get‑PnPTenantAppCatalogUrl Retrieves the url of the tenant scoped app catalog. SharePoint Online
Clear‑PnPTenantRecycleBinItem Permanently deletes a site collection from the tenant scoped recycle bin All
Restore‑PnPTenantRecycleBinItem Restores a site collection from the tenant scoped recycle bin SharePoint Online
Get‑PnPTenantSite Retrieve site information. SharePoint Online
New‑PnPTenantSite Creates a new site collection for the current tenant All
Remove‑PnPTenantSite Removes a site collection SharePoint Online
Set‑PnPTenantSite Set site information. SharePoint Online
Get‑PnPTimeZoneId Returns a time zone ID All
Get‑PnPWebTemplates Returns the available web templates. SharePoint Online

User and group management

Cmdlet Description Platforms
Get‑PnPGroup Returns a specific group or all groups. All
New‑PnPGroup Adds group to the Site Groups List and returns a group object All
Remove‑PnPGroup Removes a group from a web. All
Set‑PnPGroup Updates a group All
Get‑PnPGroupMembers Retrieves all members of a group All
Get‑PnPGroupPermissions Returns the permissions for a specific SharePoint group All
Set‑PnPGroupPermissions Adds and/or removes permissions of a specific SharePoint group All
Get‑PnPUser Returns site users of current web All
New‑PnPUser Adds a user to the built-in Site User Info List and returns a user object All
Remove‑PnPUser Removes a specific user from the site collection User Information List All
Remove‑PnPUserFromGroup Removes a user from a group All
Add‑PnPUserToGroup Adds a user to a group All

User Profiles

Cmdlet Description Platforms
New‑PnPPersonalSite Office365 only: Creates a personal / OneDrive For Business site SharePoint Online
Get‑PnPUserProfileProperty You must connect to the tenant admin website (https://:-admin.sharepoint.com) with Connect-PnPOnline in order to use this cmdlet. All
Set‑PnPUserProfileProperty Office365 only: Uses the tenant API to retrieve site information. You must connect to the tenant admin website (https://:-admin.sharepoint.com) with Connect-PnPOnline in order to use this command. SharePoint Online

Utilities

Cmdlet Description Platforms
Send‑PnPMail Sends an email using the Office 365 SMTP Service or SharePoint, depending on the parameters specified. See detailed help for more information. All

Web Parts

Cmdlet Description Platforms
Get‑PnPClientSideComponent Retrieve one or more Client-Side components from a page SharePoint Online
Remove‑PnPClientSideComponent Removes a Client-Side component from a page SharePoint Online
Set‑PnPClientSideText Set Client-Side Text Component properties SharePoint Online
Set‑PnPClientSideWebPart Set Client-Side Web Part properties SharePoint Online
Get‑PnPWebPart Returns a webpart definition object All
Remove‑PnPWebPart Removes a webpart from a page All
Get‑PnPWebPartProperty Returns a web part property All
Set‑PnPWebPartProperty Sets a web part property All
Add‑PnPWebPartToWebPartPage Adds a webpart to a web part page in a specified zone All
Add‑PnPWebPartToWikiPage Adds a webpart to a wiki page in a specified table row and column All
Get‑PnPWebPartXml Returns the webpart XML of a webpart registered on a site All

Webs

Cmdlet Description Platforms
Set‑PnPIndexedProperties Marks values of the propertybag to be indexed by search. Notice that this will overwrite the existing flags, i.e. only the properties you define with the cmdlet will be indexed. All
Add‑PnPIndexedProperty Marks the value of the propertybag key specified to be indexed by search. All
Remove‑PnPIndexedProperty Removes a key from propertybag to be indexed by search. The key and it's value remain in the propertybag, however it will not be indexed anymore. All
Get‑PnPIndexedPropertyKeys Returns the keys of the property bag values that have been marked for indexing by search All
Get‑PnPPropertyBag Returns the property bag values. All
Remove‑PnPPropertyBagValue Removes a value from the property bag All
Set‑PnPPropertyBagValue Sets a property bag value All
Request‑PnPReIndexWeb Marks the web for full indexing during the next incremental crawl All
Get‑PnPRequestAccessEmails Returns the request access e-mail addresses SharePoint Online
Set‑PnPRequestAccessEmails Sets Request Access Emails on a web SharePoint Online
Get‑PnPSubWebs Returns the subwebs of the current web All
Get‑PnPWeb Returns the current web object All
New‑PnPWeb Creates a new subweb under the current web All
Remove‑PnPWeb Removes a subweb in the current web All
Set‑PnPWeb Sets properties on a web All
Invoke‑PnPWebAction Executes operations on web, lists and list items. All
Set‑PnPWebPermission Set permissions All

Workflows

Cmdlet Description Platforms
Add‑PnPWorkflowDefinition Adds a workflow definition All
Get‑PnPWorkflowDefinition Return a workflow definition All
Remove‑PnPWorkflowDefinition Removes a workflow definition All
Get‑PnPWorkflowInstance Get workflow instances All
Resume‑PnPWorkflowInstance Resume a workflow All
Start‑PnPWorkflowInstance Starts a workflow instance on a list item All
Stop‑PnPWorkflowInstance Stops a workflow instance All
Add‑PnPWorkflowSubscription Adds a workflow subscription to a list All
Get‑PnPWorkflowSubscription Return a workflow subscription All
Remove‑PnPWorkflowSubscription Remove workflow subscription All