kwizcom banner advertisement

How to Connect to SharePoint Online using PnP PowerShell?

Requirement: Connect to SharePoint Online using PnP PowerShell

SharePoint Patterns and Practices (PnP) for SharePoint Online is a set of PowerShell cmdlets written by the community to efficiently manage SharePoint Online. To connect to SharePoint Online from PnP PowerShell, here are the steps:

Step 1: Install SharePoint Online PnP PowerShell Module
To start with PnP PowerShell, You need to download and install Windows Management Framework 5.1 from: https://www.microsoft.com/en-us/download/details.aspx?id=54616 (Select the appropriate download as per your operating system) on Windows 7/8, Windows 2008 or in Windows 2012/R2 environments. Restart your machine to complete installation.

Open SharePoint Online Management Shell or Windows PowerShell as Administrator and Run:
Install-Module SharePointPnPPowerShellOnline
Confirm the prompts and this downloads and installs PnP module for SharePoint Online
install sharepoint online pnp powershell module
You can also download and install the MSI installer from GitHub: Download PnP PowerShell for ShareOoint Online (MSI), To update an existing PnP PowerShell Module, use:
Update-Module SharePointPnPPowerShellOnline

Step 2: Connect to SharePoint Online using PnP PowerShell
Once you installed the PnP PowerShell module for SharePoint Online, the next step is to establish a connection to SharePoint Online site. PnP PowerShell module connects to a particular SharePoint Online site collection instead of connecting to the tenant as in SharePoint Online Managment Shell's Connect-SPOService!
Connect-PnPOnline -Url https://crescenttech.sharepoint.com
You'll be prompted to enter credentials to connect. Enter the user name and password to connect to your SharePoint Online site. You can also hard-code credentials in your script, such as:
$SiteURL="https://crescenttech.sharepoint.com"
$UserName="Salaudeen@thecrescenttech.com"
$Password = "password"

$SecurePassword = ConvertTo-SecureString -String $Password -AsPlainText -Force
$Cred = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist $UserName, $SecurePassword

#Connect to PNP Online
Connect-PnPOnline -Url $SiteURL -Credentials $Cred
Once the connection is established, you can start using PnP PowerShell cmdlets. Here are some examples of using PnP PowerShell cmdlets in SharePoint Online:

Create a List or Document Library:
New-PnPList -Title "Team Documents" -Template DocumentLibrary
Reference: https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/new-pnplist?view=sharepoint-ps

Create a Subsite:
New-PnPWeb -Title "emea" -Url "emea" -Template "STS#0"

SharePoint Online PnP PowerShell to Create Site Collection
Here is an another example of creating a site collection using PnP PowerShell.
#Define Variables
$AdminCenterURL = "https://crescenttech-Admin.sharepoint.com"
$SiteURL = "https://crescenttech.sharepoint.com/sites/procurement"
$SiteTitle = "Crescent Procurement Portal"
$SiteOwner = "Salaudeen@TheCrescentTech.com"
$Template = "STS#0"
$Timezone = 4
$StorageQuota = 1000 

#Get Credentials to connect
$Cred = Get-Credential

#Connect to Tenant Admin
Connect-PnPOnline -URL $AdminCenterURL -Credential $Cred

#Create site collection based on given parameters
New-PnPTenantSite -Url $SiteURL -Owner $SiteOwner -Title $SiteTitle -Template $Template -TimeZone $TimeZone -StorageQuota $StorageQuota

Use Credentials from Windows Credentials Store to Connect to PnP Online:
To avoid credential popups, you can store your credentials in Windows credentials store and connect to PnP online without user name, password prompt! Here is how:
  • Open Control Panel >> Windows credential manager
  • Select Windows Credentials >> Click on "Add a new Generic credential"
  • Enter your SharePoint Site URL, User Name and Password and hit save.
    pnp powershell save credentials to avoid password prompt
From now on, You can connect to PnP Online with the specified URL without Credentials parameter. Also works for any sites underneath the given URL!
E.g.
Connect-PnPOnline -Url "https://Crescenttech.SharePoint.com" 


SharePoint Online: Get PnP PowerShell Commands
To get all available cmdlets of PnP PowerShell, use:
Get-Command -Module SharePointPnPPowerShellOnline
There are 370 cmdlets available as of today in PnP PowerShell module for SharePoint Online.
Cmdlet Name Description
Add-PnPApp Add/uploads an available app to the app catalog. * Supported in SharePoint Online.
Add-PnPClientSidePage Adds a Client-Side Page. * Supported in SharePoint Online.
Add-PnPClientSidePageSection Adds a new section to a Client-Side page. * Supported in SharePoint Online.
Add-PnPClientSideText Adds a text element to a client-side page. * Supported in SharePoint Online.
Add-PnPClientSideWebPart Adds a Client-Side Web Part to a client-side page. * Supported in SharePoint Online.
Add-PnPContentType Adds a new content type
Add-PnPContentTypeToDocumentSet Adds a content type to a document set
Add-PnPContentTypeToList Adds a new content type to a list
Add-PnPCustomAction Adds a custom action
Add-PnPDataRowsToProvisioningTemplate Adds datarows to a list inside a PnP Provisioning Template
Add-PnPDocumentSet Creates a new document set in a library.
Add-PnPEventReceiver Adds a new remote event receiver
Add-PnPField Add a field
Add-PnPFieldFromXml Adds a field to a list or as a site column based upon a CAML/XML field definition
Add-PnPFieldToContentType Adds an existing site column to a content type
Add-PnPFile Uploads a file to Web
Add-PnPFileToProvisioningTemplate Adds a file to a PnP Provisioning Template
Add-PnPFolder Creates a folder within a parent folder
Add-PnPHtmlPublishingPageLayout Adds a HTML based publishing page layout
Add-PnPHubSiteAssociation Connects a site to a hubsite. * Supported in SharePoint Online.
Add-PnPIndexedProperty Marks the value of the propertybag key specified to be indexed by search.
Add-PnPJavaScriptBlock Adds a link to a JavaScript snippet/block to a web or site collection
Add-PnPJavaScriptLink Adds a link to a JavaScript file to a web or sitecollection
Add-PnPListFoldersToProvisioningTemplate Adds folders to a list in a PnP Provisioning Template
Add-PnPListItem Adds an item to a list
Add-PnPMasterPage Adds a Masterpage
Add-PnPNavigationNode Adds an item to a navigation element
Add-PnPOffice365GroupToSite Groupifies a classic team site by creating an Office 365 group for it and connecting the site with the newly created group. * Supported in SharePoint Online.
Add-PnPProvisioningTemplate Adds a PnP Provisioning Template object to a tenant template. * Supported in SharePoint Online.
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
Add-PnPRoleDefinition Adds a Role Defintion (Permission Level) to the site collection in the current context
Add-PnPSiteClassification Adds one ore more site classification values to the list of possible values. Requires a connection to the Microsoft Graph. * Supported in SharePoint Online.
Add-PnPSiteCollectionAdmin Adds one or more users as site collection administrators to the site collection in the current context
Add-PnPSiteCollectionAppCatalog Adds a Site Collection scoped App Catalog to a site. * Supported in SharePoint Online.
Add-PnPSiteDesign Creates a new Site Design on the current tenant. * Supported in SharePoint Online.
Add-PnPSiteDesignTask This command is used to apply a published site design to a specified site collection target. It schedules the operation allowing for the application of larger site scripts (Invoke-PnPSiteDesign is limited to 30 actions and subactions). This command is intended to replace Invoke-PnPSiteDesign and is useful when you need to apply a large number of actions or multiple site scripts. * Supported in SharePoint Online.
Add-PnPSiteScript Creates a new Site Script on the current tenant. * Supported in SharePoint Online.
Add-PnPStoredCredential Adds a credential to the Windows Credential Manager
Add-PnPTaxonomyField Add a taxonomy field
Add-PnPTenantCdnOrigin Adds a new origin to the public or private content delivery network (CDN). * Supported in SharePoint Online.
Add-PnPTenantSequence Adds a tenant sequence object to a tenant template. * Supported in SharePoint Online.
Add-PnPTenantSequenceSite Adds a existing tenant sequence site object to a tenant template. * Supported in SharePoint Online.
Add-PnPTenantSequenceSubSite Adds a tenant sequence sub site object to a tenant sequence site object. * Supported in SharePoint Online.
Add-PnPTenantTheme Adds or updates a theme to the tenant. * Supported in SharePoint Online.
Add-PnPUserToGroup Adds a user to a group
Add-PnPView Adds a view to a list
Add-PnPWebhookSubscription Adds a new Webhook subscription. * Supported in SharePoint Online.
Add-PnPWebPartToWebPartPage Adds a web part to a web part page in a specified zone
Add-PnPWebPartToWikiPage Adds a web part to a wiki page in a specified table row and column
Add-PnPWikiPage Adds a wiki page
Add-PnPWorkflowDefinition Adds a workflow definition
Add-PnPWorkflowSubscription Adds a workflow subscription to a list
Apply-PnPProvisioningTemplate Applies a site template to a web
Apply-PnPTenantTemplate Applies a tenant template to the current tenant. * Supported in SharePoint Online.
Approve-PnPTenantServicePrincipalPermissionRequest Approves a permission request for the current tenant's ""SharePoint Online Client"" service principal. * Supported in SharePoint Online.
Clear-PnPDefaultColumnValues Clear default column values for a document library
Clear-PnPListItemAsRecord Undeclares a list item as a record. * Supported in SharePoint Online.
Clear-PnPRecycleBinItem Permanently deletes all or a specific recycle bin item
Clear-PnPTenantRecycleBinItem Permanently deletes a site collection from the tenant scoped recycle bin
Connect-PnPMicrosoftGraph Connect to the Microsoft Graph
Connect-PnPOnline Connect to a SharePoint site
Convert-PnPFolderToProvisioningTemplate Creates a pnp package file of an existing template xml, and includes all files in the current folder
Convert-PnPProvisioningTemplate Converts a provisioning template to an other schema version
ConvertTo-PnPClientSidePage Converts a classic page (wiki or web part page) into a Client-Side Page. * Supported in SharePoint Online.
Copy-PnPFile Copies a file or folder to a different location
Copy-PnPItemProxy Proxy cmdlet for using Copy-Item between SharePoint provider and FileSystem provider
Deny-PnPTenantServicePrincipalPermissionRequest Denies a permission request for the current tenant's ""SharePoint Online Client"" service principal. * Supported in SharePoint Online.
Disable-PnPFeature Disables a feature
Disable-PnPInPlaceRecordsManagementForSite Disables in place records management for a site.
Disable-PnPPowerShellTelemetry Disables PnP PowerShell telemetry tracking
Disable-PnPResponsiveUI Deactive the PnP Response UI add-on
Disable-PnPSiteClassification Disables Site Classifications for the tenant. Requires a connection to the Microsoft Graph. * Supported in SharePoint Online.
Disable-PnPTenantServicePrincipal Enables the current tenant's ""SharePoint Online Client"" service principal. * Supported in SharePoint Online.
Disconnect-PnPOnline Disconnects the context
Enable-PnPFeature Enables a feature
Enable-PnPInPlaceRecordsManagementForSite Enables in place records management for a site.
Enable-PnPPowerShellTelemetry Enables PnP PowerShell telemetry tracking.
Enable-PnPResponsiveUI Activates the PnP Response UI Add-on
Enable-PnPSiteClassification Enables Site Classifications for the tenant. Requires a connection to the Microsoft Graph. * Supported in SharePoint Online.
Enable-PnPTenantServicePrincipal Enables the current tenant's ""SharePoint Online Client"" service principal. * Supported in SharePoint Online.
Export-PnPClientSidePage Exports a Client Side Page to a PnP Provisioning Template. * Supported in SharePoint Online.
Export-PnPTaxonomy Exports a taxonomy to either the output or to a file.
Export-PnPTermGroupToXml Exports a taxonomy TermGroup to either the output or to an XML file.
Find-PnPFile Finds a file in the virtual file system of the web.
Get-PnPAccessToken Returns the current OAuth Access token
Get-PnPApp Returns the available apps from the app catalog. * Supported in SharePoint Online.
Get-PnPAppAuthAccessToken Returns the access token
Get-PnPAppInstance Returns a SharePoint AddIn Instance
Get-PnPAuditing Get the Auditing setting of a site
Get-PnPAuthenticationRealm Returns the authentication realm
Get-PnPAvailableClientSideComponents Gets the available client side components on a particular page. * Supported in SharePoint Online.
Get-PnPAzureADManifestKeyCredentials Return the JSON Manifest snippet for Azure Apps
Get-PnPAzureCertificate Get PEM values and manifest settings for an existing certificate (.pfx) for use when using CSOM via an app-only ADAL application.
Get-PnPClientSideComponent Retrieve one or more Client-Side components from a page. * Supported in SharePoint Online.
Get-PnPClientSidePage Gets a Client-Side Page. * Supported in SharePoint Online.
Get-PnPConnection Returns the current context
Get-PnPContentType Retrieves a content type
Get-PnPContentTypePublishingHubUrl Returns the url to Content Type Publishing Hub
Get-PnPContext Returns the current context
Get-PnPCustomAction Return user custom actions
Get-PnPDefaultColumnValues Gets the default column values for all folders in document library
Get-PnPDocumentSetTemplate Retrieves a document set template
Get-PnPEventReceiver Return registered eventreceivers
Get-PnPException Returns the last exception that occured
Get-PnPFeature Returns all activated or a specific activated feature
Get-PnPField Returns a field from a list or site
Get-PnPFile Downloads a file.
Get-PnPFolder Return a folder object
Get-PnPFolderItem List content in folder
Get-PnPGroup Returns a specific SharePoint group or all SharePoint groups in site.
Get-PnPGroupMembers Retrieves all members of a group
Get-PnPGroupPermissions Returns the permissions for a specific SharePoint group
Get-PnPHealthScore Retrieves the healthscore
Get-PnPHideDefaultThemes Returns if the default / OOTB themes should be visible to users or not. * Supported in SharePoint Online.
Get-PnPHomePage Return the homepage
Get-PnPHubSite Retrieve all or a specific hubsite. * Supported in SharePoint Online.
Get-PnPIndexedPropertyKeys Returns the keys of the property bag values that have been marked for indexing by search
Get-PnPInPlaceRecordsManagement Returns if the place records management feature is enabled.
Get-PnPJavaScriptLink Returns all or a specific custom action(s) with location type ScriptLink
Get-PnPLabel Gets the label/tag of the specfied list or library (if applicable). * Supported in SharePoint Online.
Get-PnPList Returns a List object
Get-PnPListInformationRightsManagement Get the site closure status of the site which has a site policy applied
Get-PnPListItem Retrieves list items
Get-PnPListRecordDeclaration Returns the manual record declaration settings for a list. * Supported in SharePoint Online.
Get-PnPMasterPage Returns the URLs of the default Master Page and the custom Master Page.
Get-PnPNavigationNode Returns all or a specific navigation node
Get-PnPPowerShellTelemetryEnabled Returns true if the PnP PowerShell Telemetry has been enabled.
Get-PnPProperty Returns a previously not loaded property of a ClientObject
Get-PnPPropertyBag Returns the property bag values.
Get-PnPProvisioningTemplate Generates a provisioning site template from a web
Get-PnPProvisioningTemplateFromGallery Retrieves or searches provisioning templates from the PnP Template Gallery
Get-PnPPublishingImageRendition Returns all image renditions or if Identity is specified a specific one
Get-PnPRecycleBinItem Returns the items in the recycle bin from the context
Get-PnPRequestAccessEmails Returns the request access e-mail addresses. * Supported in SharePoint Online.
Get-PnPRoleDefinition Retrieves a Role Definitions of a site
Get-PnPSearchConfiguration Returns the search configuration
Get-PnPSearchCrawlLog Returns entries from the SharePoint search crawl log. * Supported in SharePoint Online.
Get-PnPSite Returns the current site collection from the context.
Get-PnPSiteClassification Returns the defined Site Classifications for the tenant. Requires a connection to the Microsoft Graph. * Supported in SharePoint Online.
Get-PnPSiteClosure Get the site closure status of the site which has a site policy applied
Get-PnPSiteCollectionAdmin Returns the current site collection administrators of the site colleciton in the current context
Get-PnPSiteCollectionTermStore Returns the site collection term store
Get-PnPSiteDesign Retrieve Site Designs that have been registered on the current tenant. * Supported in SharePoint Online.
Get-PnPSiteDesignRights Returns the principals with design rights on a specific Site Design. * Supported in SharePoint Online.
Get-PnPSiteDesignRun Retrieves a list of site designs applied to a specified site collection. If the WebUrl parameter is not specified we show the list of designs applied to the current site. The returned output includes the ID of the scheduled job, the web and site IDs and the site design ID,version and title. * Supported in SharePoint Online.
Get-PnPSiteDesignRunStatus Retrieves and displays a list of all site script actions executed for a specified site design applied to a site. * Supported in SharePoint Online.
Get-PnPSiteDesignTask Used to retrieve a scheduled site design script. It takes the ID of the scheduled site design and the URL for the site where the site design is scheduled to be applied. * Supported in SharePoint Online.
Get-PnPSitePolicy Retrieves all or a specific site policy
Get-PnPSiteScript Retrieve Site Scripts that have been registered on the current tenant. * Supported in SharePoint Online.
Get-PnPSiteSearchQueryResults Executes a search query to retrieve indexed site collections
Get-PnPStorageEntity Retrieve Storage Entities / Farm Properties from either the Tenant App Catalog or from the current site if it has a site scope app catalog. * Supported in SharePoint Online.
Get-PnPStoredCredential Get a credential
Get-PnPSubWebs Returns the subwebs of the current web
Get-PnPTaxonomyItem Returns a taxonomy item
Get-PnPTaxonomySession Returns a taxonomy session
Get-PnPTenant Returns organization-level site collection properties. * Supported in SharePoint Online.
Get-PnPTenantAppCatalogUrl Retrieves the url of the tenant scoped app catalog. * Supported in SharePoint Online.
Get-PnPTenantCdnEnabled Retrieves if the Office 365 Content Delivery Network has been enabled. * Supported in SharePoint Online.
Get-PnPTenantCdnOrigin Returns the current registered origins from the public or private content delivery network (CDN). * Supported in SharePoint Online.
Get-PnPTenantCdnPolicies Returns the CDN Policies for the specified CDN (Public | Private). * Supported in SharePoint Online.
Get-PnPTenantRecycleBinItem Returns all modern and classic site collections in the tenant scoped recycle bin. * Supported in SharePoint Online.
Get-PnPTenantSequence Returns one ore more provisioning sequence object(s) from a tenant template
Get-PnPTenantSequenceSite Returns one ore more sites from a tenant template
Get-PnPTenantServicePrincipal Returns the current tenant's ""SharePoint Online Client"" service principal. * Supported in SharePoint Online.
Get-PnPTenantServicePrincipalPermissionGrants Gets the collection of permission grants for the ""SharePoint Online Client"" service principal. * Supported in SharePoint Online.
Get-PnPTenantServicePrincipalPermissionRequests Gets the collection of permission requests for the ""SharePoint Online Client"" service principal. * Supported in SharePoint Online.
Get-PnPTenantSite Retrieve site information. * Supported in SharePoint Online.
Get-PnPTenantTheme Returns all or a specific theme. * Supported in SharePoint Online.
Get-PnPTerm Returns a taxonomy term
Get-PnPTermGroup Returns a taxonomy term group
Get-PnPTermSet Returns a taxonomy term set
Get-PnPTheme Returns the current theme/composed look of the current web.
Get-PnPTimeZoneId Returns a time zone ID
Get-PnPUnifiedGroup Gets one Office 365 Group (aka Unified Group) or a list of Office 365 Groups. * Supported in SharePoint Online.
Get-PnPUnifiedGroupMembers Gets members of a paricular Office 365 Group (aka Unified Group). * Supported in SharePoint Online.
Get-PnPUnifiedGroupOwners Gets owners of a paricular Office 365 Group (aka Unified Group). * Supported in SharePoint Online.
Get-PnPUPABulkImportStatus Get user profile bulk import status. * Supported in SharePoint Online.
Get-PnPUser Returns site users of current web
Get-PnPUserProfileProperty You must connect to the tenant admin website (https://:<tenant>-admin.sharepoint.com) with Connect-PnPOnline in order to use this cmdlet.
Get-PnPView Returns one or all views from a list
Get-PnPWeb Returns the current web object
Get-PnPWebhookSubscriptions Gets all the Webhook subscriptions of the resource. * Supported in SharePoint Online.
Get-PnPWebPart Returns a web part definition object
Get-PnPWebPartProperty Returns a web part property
Get-PnPWebPartXml Returns the web part XML of a web part registered on a site
Get-PnPWebTemplates Returns the available web templates. * Supported in SharePoint Online.
Get-PnPWikiPageContent Gets the contents/source of a wiki page
Get-PnPWorkflowDefinition Returns a workflow definition
Get-PnPWorkflowInstance Get workflow instances
Get-PnPWorkflowSubscription Return a workflow subscription
Grant-PnPHubSiteRights Grant additional permissions to the permissions already in place to associate sites to Hub Sites for one or more specific users. * Supported in SharePoint Online.
Grant-PnPSiteDesignRights Grants the specified principals rights to use the site design. * Supported in SharePoint Online.
Grant-PnPTenantServicePrincipalPermission Explicitely grants a specified permission to the ""SharePoint Online Client"" service principal. * Supported in SharePoint Online.
Import-PnPAppPackage Adds a SharePoint Addin to a site
Import-PnPTaxonomy Imports a taxonomy from either a string array or a file
Import-PnPTermGroupFromXml Imports a taxonomy TermGroup from either the input or from an XML file.
Import-PnPTermSet Imports a taxonomy term set from a file in the standard format.
Install-PnPApp Installs an available app from the app catalog. * Supported in SharePoint Online.
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.
Invoke-PnPQuery Executes the currently queued actions
Invoke-PnPSiteDesign Apply a Site Design to an existing site. * Requires Tenant Administration Rights *. * Supported in SharePoint Online.
Invoke-PnPWebAction Executes operations on web, lists and list items.
Measure-PnPList Returns statistics on the list object - * Supported in: SharePoint Online, SharePoint 2016, SharePoint 2019.
Measure-PnPResponseTime Gets statistics on response time for the specified endpoint by sending probe requests
Measure-PnPWeb Returns statistics on the web object - * Supported in: SharePoint Online, SharePoint 2016, SharePoint 2019.
Move-PnPClientSideComponent Moves a Client-Side Component to a different section/column. * Supported in SharePoint Online.
Move-PnPFile Moves a file to a different location
Move-PnPFolder Move a folder to another location in the current web
Move-PnPItemProxy Proxy cmdlet for using Move-Item between SharePoint provider and FileSystem provider
Move-PnPListItemToRecycleBin Moves an item from a list to the Recycle Bin
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. * Supported in SharePoint Online.
New-PnPAzureCertificate Generate a new 2048bit self-signed certificate and manifest settings for use when using CSOM via an app-only ADAL application.
New-PnPExtensibilityHandlerObject Creates an ExtensibilityHandler Object, to be used by the Get-SPOProvisioningTemplate cmdlet
New-PnPGroup Adds group to the Site Groups List and returns a group object
New-PnPList Creates a new list
New-PnPPersonalSite Office365 only: Creates a personal / OneDrive For Business site. * Supported in SharePoint Online.
New-PnPProvisioningTemplate Creates a new provisioning template object
New-PnPProvisioningTemplateFromFolder Generates a provisioning template from a given folder, including only files that are present in that folder
New-PnPSite Creates a new site collection. * Supported in SharePoint Online.
New-PnPTenantSequence Creates a new tenant sequence object. * Supported in SharePoint Online.
New-PnPTenantSequenceCommunicationSite Creates a communication site object. * Supported in SharePoint Online.
New-PnPTenantSequenceTeamNoGroupSite Creates a new team site without an Office 365 group in-memory object. * Supported in SharePoint Online.
New-PnPTenantSequenceTeamNoGroupSubSite Creates a team site subsite with no Office 365 group object. * Supported in SharePoint Online.
New-PnPTenantSequenceTeamSite Creates a team site object. * Supported in SharePoint Online.
New-PnPTenantSite Creates a new site collection for the current tenant
New-PnPTenantTemplate Creates a new tenant template object. * Supported in SharePoint Online.
New-PnPTerm Creates a taxonomy term
New-PnPTermGroup Creates a taxonomy term group
New-PnPTermSet Creates a taxonomy term set
New-PnPUnifiedGroup Creates a new Office 365 Group (aka Unified Group). * Supported in SharePoint Online.
New-PnPUPABulkImportJob Submit up a new user profile bulk import job. * Supported in SharePoint Online.
New-PnPUser Adds a user to the built-in Site User Info List and returns a user object
New-PnPWeb Creates a new subweb under the current web
Publish-PnPApp Publishes/Deploys/Trusts an available app in the app catalog. * Supported in SharePoint Online.
Read-PnPProvisioningTemplate Loads/Reads a PnP file from the file system
Read-PnPTenantTemplate Loads/Reads a PnP tenant template from the file system and returns an in-memory instance of this template. * Supported in SharePoint Online.
Register-PnPHubSite Registers a site as a hubsite. * Supported in SharePoint Online.
Remove-PnPApp Removes an app from the app catalog. * Supported in SharePoint Online.
Remove-PnPClientSideComponent Removes a Client-Side component from a page. * Supported in SharePoint Online.
Remove-PnPClientSidePage Removes a Client-Side Page. * Supported in SharePoint Online.
Remove-PnPContentType Removes a content type from a web
Remove-PnPContentTypeFromDocumentSet Removes a content type from a document set
Remove-PnPContentTypeFromList Removes a content type from a list
Remove-PnPCustomAction Removes a custom action
Remove-PnPEventReceiver Remove an eventreceiver
Remove-PnPField Removes a field from a list or a site
Remove-PnPFieldFromContentType Removes a site column from a content type
Remove-PnPFile Removes a file.
Remove-PnPFileFromProvisioningTemplate Removes a file from a PnP Provisioning Template
Remove-PnPFolder Deletes a folder within a parent folder
Remove-PnPGroup Removes a group from a web.
Remove-PnPHubSiteAssociation Disconnects a site from a hubsite. * Supported in SharePoint Online.
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.
Remove-PnPJavaScriptLink Removes a JavaScript link or block from a web or sitecollection
Remove-PnPList Deletes a list
Remove-PnPListItem Deletes an item from a list
Remove-PnPNavigationNode Removes a menu item from either the quicklaunch or top navigation
Remove-PnPPropertyBagValue Removes a value from the property bag
Remove-PnPPublishingImageRendition Removes an existing image rendition
Remove-PnPRoleDefinition Remove a Role Definition from a site
Remove-PnPSearchConfiguration Remove the search configuration
Remove-PnPSiteClassification Removes one or more existing site classification values from the list of available values. Requires a connection to the Microsoft Graph. * Supported in SharePoint Online.
Remove-PnPSiteCollectionAdmin Removes one or more users as site collection administrators from the site collection in the current context
Remove-PnPSiteCollectionAppCatalog Removes a Site Collection scoped App Catalog from a site. * Supported in SharePoint Online.
Remove-PnPSiteDesign Removes a Site Design. * Supported in SharePoint Online.
Remove-PnPSiteDesignTask Removes a Site Design Task. If the execution of the associated site script has already started the execution will not be terminated. * Supported in SharePoint Online.
Remove-PnPSiteScript Removes a Site Script. * Supported in SharePoint Online.
Remove-PnPStorageEntity Remove Storage Entities / Farm Properties from either the tenant scoped app catalog or the current site collection if the site has a site collection scoped app catalog. * Supported in SharePoint Online.
Remove-PnPStoredCredential Removes a credential
Remove-PnPTaxonomyItem Removes a taxonomy item
Remove-PnPTenantCdnOrigin Removes an origin from the Public or Private content delivery network (CDN). * Supported in SharePoint Online.
Remove-PnPTenantSite Removes a site collection. * Supported in SharePoint Online.
Remove-PnPTenantTheme Removes a theme. * Supported in SharePoint Online.
Remove-PnPTermGroup Removes a taxonomy term group and all its containing termsets
Remove-PnPUnifiedGroup Removes one Office 365 Group (aka Unified Group) or a list of Office 365 Groups. * Supported in SharePoint Online.
Remove-PnPUser Removes a specific user from the site collection User Information List
Remove-PnPUserFromGroup Removes a user from a group
Remove-PnPView Deletes a view from a list
Remove-PnPWeb Removes a subweb in the current web
Remove-PnPWebhookSubscription Removes a Webhook subscription from the resource. * Supported in SharePoint Online.
Remove-PnPWebPart Removes a web part from a page
Remove-PnPWikiPage Removes a wiki page
Remove-PnPWorkflowDefinition Removes a workflow definition
Remove-PnPWorkflowSubscription Remove workflow subscription
Rename-PnPFile Renames a file in its current location
Rename-PnPFolder Renames a folder
Request-PnPReIndexList Marks the list for full indexing during the next incremental crawl
Request-PnPReIndexWeb Marks the web for full indexing during the next incremental crawl
Reset-PnPFileVersion Resets a file to its previous version
Resolve-PnPFolder Returns a folder from a given site relative path, and will create it if it does not exist.
Restore-PnPRecycleBinItem Restores the provided recycle bin item to its original location
Restore-PnPTenantRecycleBinItem Restores a site collection from the tenant scoped recycle bin. * Supported in SharePoint Online.
Resume-PnPWorkflowInstance Resume a workflow
Revoke-PnPSiteDesignRights Revokes the specified principals rights to use the site design. * Supported in SharePoint Online.
Revoke-PnPTenantServicePrincipalPermission Revokes a permission that was previously granted to the ""SharePoint Online Client"" service principal. * Supported in SharePoint Online.
Save-PnPProvisioningTemplate Saves a PnP site template to the file system
Save-PnPTenantTemplate Saves a PnP provisioning hierarchy to the file system. * Supported in SharePoint Online.
Send-PnPMail Sends an email using the Office 365 SMTP Service or SharePoint, depending on the parameters specified. See detailed help for more information.
Set-PnPAppSideLoading Enables the App SideLoading Feature on a site
Set-PnPAuditing Set Auditing setting for a site
Set-PnPAvailablePageLayouts Sets the available page layouts for the current site
Set-PnPClientSidePage Sets parameters of a Client-Side Page. * Supported in SharePoint Online.
Set-PnPClientSideText Set Client-Side Text Component properties. * Supported in SharePoint Online.
Set-PnPClientSideWebPart Set Client-Side Web Part properties. * Supported in SharePoint Online.
Set-PnPContext Set the ClientContext
Set-PnPDefaultColumnValues Sets default column values for a document library
Set-PnPDefaultContentTypeToList Sets the default content type for a list
Set-PnPDefaultPageLayout Sets a specific page layout to be the default page layout for a publishing site
Set-PnPDocumentSetField Sets a site column from the available content types to a document set
Set-PnPField Changes one or more properties of a field in a specific list or for the whole web
Set-PnPFileCheckedIn Checks in a file
Set-PnPFileCheckedOut Checks out a file
Set-PnPGroup Updates a group
Set-PnPGroupPermissions Adds and/or removes permissions of a specific SharePoint group
Set-PnPHideDefaultThemes Defines if the default / OOTB themes should be visible to users or not. * Supported in SharePoint Online.
Set-PnPHomePage Sets the home page of the current web.
Set-PnPHubSite Sets hubsite properties. * Supported in SharePoint Online.
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.
Set-PnPInPlaceRecordsManagement Activates or deactivates in the place records management feature.
Set-PnPLabel Sets a label/tag on the specified list or library. * Supported in SharePoint Online.
Set-PnPList Updates list settings
Set-PnPListInformationRightsManagement Get the site closure status of the site which has a site policy applied
Set-PnPListItem Updates a list item
Set-PnPListItemAsRecord Declares a list item as a record. * Supported in SharePoint Online.
Set-PnPListItemPermission Sets list item permissions
Set-PnPListPermission Sets list permissions
Set-PnPListRecordDeclaration The RecordDeclaration parameter supports 4 values: AlwaysAllowManualDeclaration, NeverAllowManualDeclaration, UseSiteCollectionDefaults. * Supported in SharePoint Online.
Set-PnPMasterPage Set the masterpage
Set-PnPMinimalDownloadStrategy Activates or deactivates the minimal downloading strategy.
Set-PnPPropertyBagValue Sets a property bag value
Set-PnPProvisioningTemplateMetadata Sets metadata of a provisioning template
Set-PnPRequestAccessEmails Sets Request Access Emails on a web. * Supported in SharePoint Online.
Set-PnPSearchConfiguration Sets the search configuration
Set-PnPSite Sets Site Collection properties. * Supported in SharePoint Online.
Set-PnPSiteClosure Opens or closes a site which has a site policy applied
Set-PnPSiteDesign Updates a Site Design on the current tenant. * Supported in SharePoint Online.
Set-PnPSitePolicy Sets a site policy
Set-PnPSiteScript Updates an existing Site Script on the current tenant. * Supported in SharePoint Online.
Set-PnPStorageEntity Set Storage Entities / Farm Properties in either the tenant scoped app catalog or the site collection app catalog. * Supported in SharePoint Online.
Set-PnPTaxonomyFieldValue Sets a taxonomy term value in a listitem field
Set-PnPTenant Sets organization-level site collection properties. * Supported in SharePoint Online.
Set-PnPTenantCdnEnabled Enables or disabled the public or private Office 365 Content Delivery Network (CDN). * Supported in SharePoint Online.
Set-PnPTenantCdnPolicy Sets the CDN Policies for the specified CDN (Public | Private). * Supported in SharePoint Online.
Set-PnPTenantSite Set site information. * Supported in SharePoint Online.
Set-PnPTheme Sets the theme of the current web.
Set-PnPTraceLog Turn log tracing on or off
Set-PnPUnifiedGroup Sets Office 365 Group (aka Unified Group) properties. * Supported in SharePoint Online.
Set-PnPUserProfileProperty Office365 only: Uses the tenant API to retrieve site information.
Set-PnPView Change view properties
Set-PnPWeb Sets properties on a web
Set-PnPWebhookSubscription Updates a Webhook subscription. * Supported in SharePoint Online.
Set-PnPWebPartProperty Sets a web part property
Set-PnPWebPermission Set permissions
Set-PnPWebTheme Sets the theme of the current web. * Supported in SharePoint Online.
Set-PnPWikiPageContent Sets the contents of a wikipage
Start-PnPWorkflowInstance Starts a workflow instance on a list item
Stop-PnPWorkflowInstance Stops a workflow instance
Submit-PnPSearchQuery Executes an arbitrary search query against the SharePoint search index
Test-PnPListItemIsRecord Checks if a list item is a record. * Supported in SharePoint Online.
Test-PnPOffice365GroupAliasIsUsed Tests if a given alias is already used used. * Supported in SharePoint Online.
Test-PnPTenantTemplate Tests a tenant template for invalid references
Uninstall-PnPApp Uninstalls an available add-in from the site
Uninstall-PnPAppInstance Removes an app from a site
Uninstall-PnPSolution Uninstalls a sandboxed solution from a site collection
Unpublish-PnPApp Unpublishes/retracts an available add-in from the app catalog. * Supported in SharePoint Online.
Unregister-PnPHubSite Unregisters a site as a hubsite. * Supported in SharePoint Online.
Update-PnPApp Updates an available app from the app catalog. * Supported in SharePoint Online.
Update-PnPSiteClassification Updates Site Classifications for the tenant. Requires a connection to the Microsoft Graph. * Supported in SharePoint Online.
How to Connect to SharePoint Online using PnP PowerShell? How to Connect to SharePoint Online using PnP PowerShell? Reviewed by Salaudeen Rajack on March 23, 2018 Rating: 5

No comments:

Please Login and comment to get your questions answered!

Powered by Blogger.