Skip to content

Latest commit

 

History

History
281 lines (279 loc) · 23.2 KB

readme.md

File metadata and controls

281 lines (279 loc) · 23.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
Uninstall‑PnPAppInstance Removes an app from a site
Get‑PnPAppInstance Returns a SharePoint AddIn Instance in the site
Import‑PnPAppPackage Adds a SharePoint Addin to a site
##Base Cmdlets
Cmdlet Description
:----- :----------
Get‑PnPAuthenticationRealm Gets the authentication realm for the current web
Get‑PnPAzureADManifestKeyCredentials Creates the JSON snippet that is required for the manifest JSON file for Azure WebApplication / WebAPI apps
Get‑PnPContext Returns a Client Side Object Model context
Set‑PnPContext Sets the Client Context to use by the cmdlets
Get‑PnPHealthScore Retrieves the current health score value of the server
Disconnect‑PnPOnline Disconnects the context
Connect‑PnPOnline Connects to a SharePoint site and creates a context that is required for the other PnP Cmdlets
Get‑PnPProperty Will populate properties of an object and optionally, if needed, load the value from the server. If one property is specified its value will be returned to the output.
Execute‑PnPQuery Executes any queued actions / changes on the SharePoint Client Side Object Model Context
Get‑PnPStoredCredential Returns a stored credential from the Windows Credential Manager
Set‑PnPTraceLog Defines if tracing should be turned on. PnP Core, which is the foundation of these cmdlets uses the standard Trace functionality of .NET. With this cmdlet you can turn capturing of this trace to a log file on or off.
##Branding
Cmdlet Description
:----- :----------
Remove‑PnPCustomAction Removes a custom action
Get‑PnPCustomAction Returns all or a specific custom action(s)
Add‑PnPCustomAction Adds a custom action to a web
Get‑PnPHomePage Returns the URL to the home page
Set‑PnPHomePage Sets the home page of the current web.
Add‑PnPJavaScriptBlock Adds a link to a JavaScript snippet/block to a web or site collection
Get‑PnPJavaScriptLink Returns all or a specific custom action(s) with location type ScriptLink
Remove‑PnPJavaScriptLink Removes a JavaScript link or block from a web or sitecollection
Add‑PnPJavaScriptLink Adds a link to a JavaScript file to a web or sitecollection
Get‑PnPMasterPage Returns the URLs of the default Master Page and the custom Master Page.
Set‑PnPMasterPage Sets the default master page of the current web.
Set‑PnPMinimalDownloadStrategy Activates or deactivates the minimal downloading strategy.
Add‑PnPNavigationNode Adds a menu item to either the quicklaunch or top navigation
Remove‑PnPNavigationNode Removes a menu item from either the quicklaunch or top navigation
Disable‑PnPResponsiveUI Disables the PnP Responsive UI implementation on a classic SharePoint Site
Enable‑PnPResponsiveUI Enables the PnP Responsive UI implementation on a classic SharePoint Site
Get‑PnPTheme Returns the current theme/composed look of the current web.
Set‑PnPTheme Sets the theme of the current web.
##Content Types
Cmdlet Description
:----- :----------
Remove‑PnPContentType Removes a content type from a web
Get‑PnPContentType Retrieves a content type
Add‑PnPContentType Adds a new content type
Remove‑PnPContentTypeFromList Removes a content type from a list
Add‑PnPContentTypeToList Adds a new content type to a list
Set‑PnPDefaultContentTypeToList Sets the default content type for a list
Remove‑PnPFieldFromContentType Removes a site column from a content type
Add‑PnPFieldToContentType Adds an existing site column to a content type
##Document Sets
Cmdlet Description
:----- :----------
Remove‑PnPContentTypeFromDocumentSet Removes a content type from a document set
Add‑PnPContentTypeToDocumentSet Adds a content type to a document set
Add‑PnPDocumentSet Creates a new document set in a library.
Set‑PnPDocumentSetField Sets a site column from the available content types to a document set
Get‑PnPDocumentSetTemplate Retrieves a document set template
##Event Receivers
Cmdlet Description
:----- :----------
Add‑PnPEventReceiver Adds a new event receiver
Get‑PnPEventReceiver Returns all or a specific event receiver
Remove‑PnPEventReceiver Removes/unregisters a specific event receiver
##Features
Cmdlet Description
:----- :----------
New‑PnPExtensbilityHandlerObject Creates an ExtensibilityHandler Object, to be used by the Get-SPOProvisioningTemplate cmdlet
Get‑PnPFeature Returns all activated or a specific activated feature
Disable‑PnPFeature Disables a feature
Enable‑PnPFeature Enables a feature
##Fields
Cmdlet Description
:----- :----------
Remove‑PnPField Removes a field from a list or a site
Get‑PnPField Returns a field from a list or site
Add‑PnPField Adds a field to a list or as a site column
Add‑PnPFieldFromXml Adds a field to a list or as a site column based upon a CAML/XML field definition
Add‑PnPTaxonomyField Adds a taxonomy field to a list or as a site column.
##Files and Folders
Cmdlet Description
:----- :----------
Copy‑PnPFile Copies a file to a different location
Move‑PnPFile Moves a file to a different location
Rename‑PnPFile Renames a file in its current location
Remove‑PnPFile Removes a file.
Get‑PnPFile Downloads a file.
Find‑PnPFile Finds a file in the virtual file system of the web.
Add‑PnPFile Uploads a file to Web
Set‑PnPFileCheckedIn Checks in a file
Set‑PnPFileCheckedOut Checks out a file
Move‑PnPFolder Move a folder to another location in the current web
Rename‑PnPFolder Renames a folder
Get‑PnPFolder Return a folder object
Ensure‑PnPFolder Returns a folder from a given site relative path, and will create it if it does not exist.
Add‑PnPFolder Creates a folder within a parent folder
Remove‑PnPFolder Deletes a folder within a parent folder
Get‑PnPFolderItem List content in folder
##Information Management
Cmdlet Description
:----- :----------
Get‑PnPSitePolicy Retrieves all or a specific site policy
Set‑PnPSitePolicy Sets a site policy
##Lists
Cmdlet Description
:----- :----------
Set‑PnPDefaultColumnValues Sets default column values for a document library
Remove‑PnPList Deletes a list
Set‑PnPList Updates list settings
Get‑PnPList Returns a List object
New‑PnPList Creates a new list
Add‑PnPListItem Adds an item to a list
Remove‑PnPListItem Deletes an item from a list
Set‑PnPListItem Updates a list item
Get‑PnPListItem Retrieves list items
Set‑PnPListPermission Sets list permissions
Get‑PnPProvisioningTemplateFromGallery Retrieves or searches provisioning templates from the PnP Template Gallery
Request‑PnPReIndexList Marks the list for full indexing during the next incremental crawl
Add‑PnPView Adds a view to a list
Get‑PnPView Returns one or all views from a list
Remove‑PnPView Deletes a view from a list
##Microsoft Graph
Cmdlet Description
:----- :----------
Connect‑PnPMicrosoftGraph Uses the Microsoft Authentication Library (Preview) to connect to Azure AD and to get an OAuth 2.0 Access Token to consume the Microsoft Graph API
Get‑PnPUnifiedGroup Gets one Office 365 Group (aka Unified Group) or a list of Office 365 Groups
New‑PnPUnifiedGroup Creates a new Office 365 Group (aka Unified Group)
Remove‑PnPUnifiedGroup Removes one Office 365 Group (aka Unified Group) or a list of Office 365 Groups
Set‑PnPUnifiedGroup Sets Office 365 Group (aka Unified Group) properties
##Provisioning
Cmdlet Description
:----- :----------
Remove‑PnPFileFromProvisioningTemplate Removes a file from an in-memory PnP Provisioning Template
Add‑PnPFileToProvisioningTemplate Adds a file to an in-memory PnP Provisioning Template
Convert‑PnPFolderToProvisioningTemplate Creates a pnp package file of an existing template xml, and includes all files in the current folder
Load‑PnPProvisioningTemplate Loads a PnP file from the file systems
New‑PnPProvisioningTemplate Creates a new provisioning template object
Save‑PnPProvisioningTemplate Saves a PnP file to the file systems
Convert‑PnPProvisioningTemplate Converts a provisioning template to a other schema version
Apply‑PnPProvisioningTemplate Applies a provisioning template to a web
Get‑PnPProvisioningTemplate Generates a provisioning template from a web
New‑PnPProvisioningTemplateFromFolder Generates a provisioning template from a given folder, including only files that are present in that folder
Set‑PnPProvisioningTemplateMetadata Sets metadata of a provisioning template
##Publishing
Cmdlet Description
:----- :----------
Set‑PnPAvailablePageLayouts Sets the available page layouts for the current site
Set‑PnPDefaultPageLayout Sets a specific page layout to be the default page layout for a publishing site
Add‑PnPHtmlPublishingPageLayout Adds a HTML based publishing page layout
Add‑PnPMasterPage Adds a Masterpage
Remove‑PnPPublishingImageRendition Removes an existing image rendition
Get‑PnPPublishingImageRendition Returns all image renditions or if Identity is specified a specific one
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.
Add‑PnPPublishingPage Adds a publishing page
Add‑PnPPublishingPageLayout Adds a publishing page layout
Remove‑PnPWikiPage Removes a wiki page
Add‑PnPWikiPage Adds a wiki page
Get‑PnPWikiPageContent Gets the contents/source of a wiki page
Set‑PnPWikiPageContent Sets the contents of a wikipage
##Search
Cmdlet Description
:----- :----------
Set‑PnPSearchConfiguration Sets the search configuration
Get‑PnPSearchConfiguration Returns the search configuration
Get‑PnPSiteSearchQueryResults Executes a search query to retrieve indexed site collections
##SharePoint Recycle Bin
Cmdlet Description
:----- :----------
Restore‑PnpRecycleBinItem Restores the provided recycle bin item to its original location
Clear‑PnpRecycleBinItem Permanently deletes all or a specific recycle bin item
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
Get‑PnPRecycleBinItem Returns the items in the recycle bin from the context
Get‑PnPTenantRecycleBinItem Returns the items in the tenant scoped recycle bin
##Sites
Cmdlet Description
:----- :----------
Set‑PnPAppSideLoading Enables the App SideLoading Feature on a site
Get‑PnPAuditing Get the Auditing setting of a site
Set‑PnPAuditing Set Auditing setting for a site
Get‑PnPSite Returns the current site collection from the context.
Uninstall‑PnPSolution Uninstalls a sandboxed solution from a site collection
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.
Get‑SPOSite Returns the current site collection from the context.
##Taxonomy
Cmdlet Description
:----- :----------
Import‑PnPTaxonomy Imports a taxonomy from either a string array or a file
Export‑PnPTaxonomy Exports a taxonomy to either the output or to a file.
Set‑PnPTaxonomyFieldValue Sets a taxonomy term value in a listitem field
Remove‑PnPTaxonomyItem Removes a taxonomy item
Get‑PnPTaxonomyItem Returns a taxonomy item
Get‑PnPTaxonomySession Returns a taxonomy session
Remove‑PnPTermGroup Removes a taxonomy term group and all its containing termsets
New‑PnPTermGroup Creates a taxonomy term group
Get‑PnPTermGroup Returns a taxonomy term group
Import‑PnPTermGroupFromXml Imports a taxonomy TermGroup from either the input or from an XML file.
Export‑PnPTermGroupToXml Exports a taxonomy TermGroup to either the output or to an XML file.
Import‑PnPTermSet Imports a taxonomy term set from a file in the standard format.
##Tenant Administration
Cmdlet Description
:----- :----------
Get‑PnPAccessToken Gets the OAuth 2.0 Access Token to consume the Microsoft Graph API
Clear‑PnPTenantRecycleBinItem Permanently deletes a site collection from the tenant scoped recycle bin
Restore‑PnPTenantRecycleBinItem Restores a site collection from the tenant scoped recycle bin
Set‑PnPTenantSite Office365 only: Uses the tenant API to set site information.
Get‑PnPTenantSite Office365 only: Uses the tenant API to retrieve site information.
Remove‑PnPTenantSite Office365 only: Removes a site collection from the current tenant
New‑PnPTenantSite Creates a new site collection for the current tenant
Get‑PnPTimeZoneId Returns a time zone ID
Get‑PnPWebTemplates Office365 only: Returns the available web templates.
##User and group management
Cmdlet Description
:----- :----------
Remove‑PnPGroup Removes a group from a web.
Set‑PnPGroup Updates a group
New‑PnPGroup Adds group to the Site Groups List and returns a group object
Get‑PnPGroup Returns a specific group or all groups.
Set‑PnPGroupPermissions Adds and/or removes permissions of a specific SharePoint group
Get‑PnPGroupPermissions Returns the permissions for a specific SharePoint group
New‑PnPUser Adds a user to the built-in Site User Info List and returns a user object
Remove‑PnPUserFromGroup Removes a user from a group
Add‑PnPUserToGroup Adds a user to a group
##User Profiles
Cmdlet Description
:----- :----------
New‑PnPPersonalSite Office365 only: Creates a personal / OneDrive For Business site
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.
Get‑PnPUserProfileProperty You must connect to the tenant admin website (https://:-admin.sharepoint.com) with Connect-PnPOnline in order to use this cmdlet.
##Utilities
Cmdlet Description
:----- :----------
Send‑PnPMail Sends an email using the Office 365 SMTP Service or SharePoint, depending on the parameters specified. See detailed help for more information.
##Web Parts
Cmdlet Description
:----- :----------
Remove‑PnPWebPart Removes a webpart from a page
Get‑PnPWebPart Returns a webpart definition object
Get‑PnPWebPartProperty Returns a web part property
Set‑PnPWebPartProperty Sets a web part property
Add‑PnPWebPartToWebPartPage Adds a webpart to a web part page in a specified zone
Add‑PnPWebPartToWikiPage Adds a webpart to a wiki page in a specified table row and column
Get‑PnPWebPartXml Returns the webpart XML of a webpart registered on a site
##Webs
Cmdlet Description
:----- :----------
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.
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.
Add‑PnPIndexedProperty Marks the value of the propertybag key specified to be indexed by search.
Get‑PnPIndexedPropertyKeys Returns the keys of the property bag values that have been marked for indexing by search
Get‑PnPPropertyBag Returns the property bag values.
Remove‑PnPPropertyBagValue Removes a value from the property bag
Set‑PnPPropertyBagValue Sets a property bag value
Request‑PnPReIndexWeb Marks the web for full indexing during the next incremental crawl
Get‑PnPRequestAccessEmails Returns the request access e-mail addresses
Set‑PnPRequestAccessEmails Sets Request Access Emails on a web
Get‑PnPSubWebs Returns the subwebs of the current web
Remove‑PnPWeb Removes a subweb in the current web
Get‑PnPWeb Returns the current web object
New‑PnPWeb Creates a new subweb under the current web
Set‑PnPWeb Sets properties on a web
Invoke‑PnPWebAction Executes operations on web, lists and list items.
##Workflows
Cmdlet Description
:----- :----------
Add‑PnPWorkflowDefinition Adds a workflow definition
Remove‑PnPWorkflowDefinition Removes a workflow definition
Get‑PnPWorkflowDefinition Returns a workflow definition
Resume‑PnPWorkflowInstance Resumes a previously stopped workflow instance
Stop‑PnPWorkflowInstance Stops a workflow instance
Remove‑PnPWorkflowSubscription Removes a workflow subscription
Add‑PnPWorkflowSubscription Adds a workflow subscription to a list
Get‑PnPWorkflowSubscription Returns a workflow subscriptions from a list