### Parameter Configuration Examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPSiteTemplate.md Examples of parameter definitions for the Get-PnPSiteTemplate cmdlet. ```yaml Type: ExtractConfigurationPipeBind Parameter Sets: (All) Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ```yaml Type: SwitchParameter Parameter Sets: (All) Aliases: cf Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ```yaml Type: PnPConnection Parameter Sets: (All) Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ```yaml Type: String[] Parameter Sets: (All) Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ```yaml Type: Encoding Parameter Sets: (All) Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ```yaml Type: SwitchParameter Parameter Sets: (All) Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ```yaml Type: Handlers Parameter Sets: (All) Accepted values: All, ApplicationLifecycleManagement, AuditSettings, ComposedLook, ContentTypes, CustomActions, ExtensibilityProviders, Features, Fields, Files, ImageRenditions, Lists, Navigation, None, PageContents, Pages, PropertyBagEntries, Publishing, RegionalSettings, SearchSettings, SiteFooter, SiteHeader, SitePolicy, SiteSecurity, SiteSettings, SupportedUILanguages, SyntexModels, Tenant, TermGroups, Theme, WebApiPermissions, WebSettings, Workflows Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ```yaml Type: ExtensibilityHandler[] Parameter Sets: (All) Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ```yaml Type: SwitchParameter Parameter Sets: (All) Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -------------------------------- ### Retrieve Power Apps Examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPPowerApp.md Examples demonstrating how to retrieve all apps from the default environment or a specific app from a target environment. ```powershell Get-PnPPowerApp ``` ```powershell Get-PnPPowerApp -Environment (Get-PnPPowerPlatformEnvironment -Identity "myenvironment") -Identity fba63225-baf9-4d76-86a1-1b42c917a182 ``` -------------------------------- ### Get-PnPHomeSite Examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPHomeSite.md Common usage examples for retrieving home site information. ```powershell Get-PnPHomeSite ``` ```powershell Get-PnPHomeSite -IsVivaConnectionsDefaultStartForCompanyPortalSiteEnabled ``` ```powershell Get-PnPHomeSite -Detailed ``` -------------------------------- ### Add-PnPPlannerBucket Examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Add-PnPPlannerBucket.md Practical examples of adding a bucket using group/plan names or a specific plan ID. ```powershell Add-PnPPlannerBucket -Group "My Group" -Plan "My Plan" -Name "Project Todos" ``` ```powershell Add-PnPPlannerBucket -PlanId "QvfkTd1mc02gwxHjHC_43JYABhAy" -Name "Project Todos" ``` -------------------------------- ### Get-PnPEntraIDApp Usage Examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPEntraIDApp.md Examples demonstrating how to retrieve all apps, a specific app by name or ID, and filtered results. ```powershell Get-PnPEntraIDApp ``` ```powershell Get-PnPEntraIDApp -Identity MyApp ``` ```powershell Get-PnPEntraIDApp -Identity 93a9772d-d0af-4ed8-9821-17282b64690e ``` ```powershell Get-PnPEntraIDApp -Filter "startswith(description, 'contoso')" ``` -------------------------------- ### Start a site-level job to synchronize list version policies Source: https://github.com/pnp/powershell/blob/dev/documentation/New-PnPSiteManageVersionPolicyJob.md Use this example to queue a job that synchronizes version policies across all document libraries within a site collection. This ensures consistent versioning settings throughout the site. ```powershell New-PnPSiteManageVersionPolicyJob -Identity "https://contoso.sharepoint.com/sites/project-x" -SyncListPolicy ``` -------------------------------- ### Get Webhook Subscriptions for All Lists Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPWebhookSubscription.md This example retrieves webhook subscriptions for all lists in the site by first getting all list objects and then piping them to the Get-PnPWebhookSubscription cmdlet. This is useful for auditing or managing subscriptions across the entire site. ```powershell Get-PnPList | Get-PnPWebhookSubscription ``` -------------------------------- ### Convert-PnPFile Usage Examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Convert-PnPFile.md Practical examples demonstrating file conversion to memory streams, local paths, and SharePoint folders. ```powershell Convert-PnPFile -Url "/sites/demo/Shared Documents/Document.docx" -AsMemoryStream ``` ```powershell Convert-PnPFile -Url "/sites/demo/Shared Documents/Document.docx" ``` ```powershell Convert-PnPFile -Url "/sites/demo/Shared Documents/Document.docx" -Path "C:\Temp" ``` ```powershell Convert-PnPFile -Url "/sites/demo/Shared Documents/Document.docx" -Path "C:\Temp" -Force ``` ```powershell Convert-PnPFile -Url "/sites/demo/Shared Documents/Test/Book.xlsx" -Folder "/sites/demo/Shared Documents/Archive" ``` ```powershell Convert-PnPFile -Url "/sites/demo/Shared Documents/Test/Book.png" -ConvertToFormat Jpg -Folder "/sites/demo/Shared Documents/Archive" ``` ```powershell Convert-PnPFile -Url "/sites/demo/Shared Documents/Test/Book.xlsx" -Folder "/sites/demo/Shared Documents/Archive" -NewFileName "differentname.pdf" ``` -------------------------------- ### Add-PnPSiteScriptPackage Example Source: https://github.com/pnp/powershell/blob/dev/documentation/Add-PnPSiteScriptPackage.md Example usage for creating a new site script package with a title, description, and content path. ```powershell Add-PnPSiteScriptPackage -Title "My Site Script Package" -Description "A more detailed description" -ContentPath "c:\package.zip" ``` -------------------------------- ### Add-PnPWebPartToWebPartPage Examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Add-PnPWebPartToWebPartPage.md Examples demonstrating how to add a web part using a file path or a variable containing XML. ```powershell Add-PnPWebPartToWebPartPage -ServerRelativePageUrl "/sites/demo/sitepages/home.aspx" -Path "c:\myfiles\listview.webpart" -ZoneId "Header" -ZoneIndex 1 ``` ```powershell Add-PnPWebPartToWebPartPage -ServerRelativePageUrl "/sites/demo/sitepages/home.aspx" -XML $webpart -ZoneId "Header" -ZoneIndex 1 ``` -------------------------------- ### Retrieve Flows Examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPFlow.md Various examples demonstrating how to retrieve flows using different parameters and pipeline inputs. ```powershell Get-PnPFlow -AsAdmin ``` ```powershell Get-PnPPowerPlatformEnvironment -Identity "MyOrganization (default)" | Get-PnPFlow ``` ```powershell Get-PnPFlow -SharingStatus SharedWithMe ``` ```powershell Get-PnPFlow -Identity fba63225-baf9-4d76-86a1-1b42c917a182 ``` -------------------------------- ### Reset-PnPFileVersion usage examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Reset-PnPFileVersion.md Examples demonstrating how to reset a file to its previous version using a server-relative URL, with optional check-in parameters. ```powershell Reset-PnPFileVersion -ServerRelativeUrl "/sites/test/office365.png" ``` ```powershell Reset-PnPFileVersion -ServerRelativeUrl "/sites/test/office365.png" -CheckinType MajorCheckin -Comment "Restored to previous version" ``` -------------------------------- ### Register Entra ID App Examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Register-PnPEntraIDAppForInteractiveLogin.md Examples demonstrating basic application registration and registration with custom permission scopes. ```powershell Register-PnPEntraIDAppForInteractiveLogin -ApplicationName TestApp -Tenant yourtenant.onmicrosoft.com ``` ```powershell Register-PnPEntraIDAppForInteractiveLogin -ApplicationName TestApp -Tenant yourtenant.onmicrosoft.com -GraphDelegatePermissions "Group.Read.All" -SharePointDelegatePermissions "AllSites.FullControl" ``` -------------------------------- ### Install Docker on Linux Source: https://github.com/pnp/powershell/blob/dev/pages/articles/docker.md Use the official convenience script to install Docker on Linux distributions. ```bash bash <(curl -s https://get.docker.com/) sudo usermod -aG docker $USER newgrp docker ``` -------------------------------- ### Submit-PnPSearchQuery Examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Submit-PnPSearchQuery.md Common usage examples for executing search queries. ```powershell Submit-PnPSearchQuery -Query "finance" ``` ```powershell Submit-PnPSearchQuery -Query "Title:Intranet*" -MaxResults 10 ``` ```powershell Submit-PnPSearchQuery -Query "Title:Intranet*" -All ``` ```powershell Submit-PnPSearchQuery -Query "Title:Intranet*" -Refiners "contentclass,FileType(filter=6/0/*)" ``` ```powershell Submit-PnPSearchQuery -Query "contentclass:STS_ListItem_DocumentLibrary" -SelectProperties ComplianceTag,InformationProtectionLabelId -All ``` ```powershell Submit-PnPSearchQuery -Query "contentclass:STS_ListItem_DocumentLibrary" -SortList @{"filename" = "ascending"} -All ``` -------------------------------- ### Set-PnPUserProfileProperty Examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Set-PnPUserProfileProperty.md Examples demonstrating how to update single and multi-value properties for a user. ```powershell Set-PnPUserProfileProperty -Account 'john@domain.com' -Property 'SPS-Location' -Value 'Stockholm' ``` ```powershell Set-PnPUserProfileProperty -Account 'john@domain.com' -Property 'MyProperty' -Values 'Value 1','Value 2' ``` -------------------------------- ### Move-PnPPageComponent Usage Examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Move-PnPPageComponent.md Practical examples demonstrating how to move components to specific sections, columns, and positions. ```powershell Move-PnPPageComponent -Page Home -InstanceId a2875399-d6ff-43a0-96da-be6ae5875f82 -Section 1 ``` ```powershell Move-PnPPageComponent -Page Home -InstanceId a2875399-d6ff-43a0-96da-be6ae5875f82 -Column 2 ``` ```powershell Move-PnPPageComponent -Page Home -InstanceId a2875399-d6ff-43a0-96da-be6ae5875f82 -Section 1 -Column 2 ``` ```powershell Move-PnPPageComponent -Page Home -InstanceId a2875399-d6ff-43a0-96da-be6ae5875f82 -Section 1 -Column 2 -Position 2 ``` -------------------------------- ### Add-PnPTeamsChannelUser Examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Add-PnpTeamsChannelUser.md Examples demonstrating how to add a user as an owner or member to a private channel. ```powershell Add-PnPTeamsChannelUser -Team 4efdf392-8225-4763-9e7f-4edeb7f721aa -Channel "19:796d063b63e34497aeaf092c8fb9b44e@thread.skype" -User john@doe.com -Role Owner ``` ```powershell Add-PnPTeamsChannelUser -Team "My Team" -Channel "My Private Channel" -User john@doe.com -Role Member ``` -------------------------------- ### Remove-PnPApplicationCustomizer Examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Remove-PnPApplicationCustomizer.md Examples demonstrating how to remove custom actions using specific identifiers and scopes. ```powershell Remove-PnPApplicationCustomizer -Identity aa66f67e-46c0-4474-8a82-42bf467d07f2 ``` ```powershell Remove-PnPApplicationCustomizer -ClientSideComponentId aa66f67e-46c0-4474-8a82-42bf467d07f2 -Scope web ``` -------------------------------- ### Retrieve Specific M365 Group Setting Template by Identity Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPMicrosoft365GroupSettingTemplates.md To get a particular Microsoft 365 Group setting template, provide its unique Identity (GUID). For example, retrieving the 'Group.Unified.Guest' template requires its specific GUID. ```powershell Get-PnPMicrosoft365GroupSettingTemplates -Identity "08d542b9-071f-4e16-94b0-74abb372e3d9" ``` -------------------------------- ### Get-PnPTenantId Examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPTenantId.md Various usage examples for retrieving Tenant IDs, including scenarios with and without active connections. ```powershell Get-PnPTenantId ``` ```powershell Get-PnPTenantId contoso ``` ```powershell Get-PnPTenantId -TenantUrl contoso.sharepoint.com ``` ```powershell Get-PnPTenantId -TenantUrl contoso.sharepoint.us -AzureEnvironment USGovernment ``` -------------------------------- ### Install Docker on macOS Source: https://github.com/pnp/powershell/blob/dev/pages/articles/docker.md Install Docker Desktop on macOS using Homebrew. ```bash brew install --cask docker ``` -------------------------------- ### Get Specific Entra ID Sign-in Log by ID Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPEntraIDActivityReportSignIn.md Fetches a single sign-in log entry using its unique identifier. Replace the example GUID with the actual ID of the log you need. ```powershell Get-PnPEntraIDActivityReportSignIn -Identity "da364266-533d-3186-a8b2-44ee1c21af11" ``` -------------------------------- ### Example: Get Specific Report Details Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPEnterpriseAppInsightsReport.md This example shows how to retrieve detailed information about a report using its specific ReportId. ```powershell Get-PnPEnterpriseAppInsightsReport -ReportId bed8845f-72ba-43ec-b1f3-844ff6a64f28 ``` -------------------------------- ### Connect to SharePoint and Apply Provisioning Template Source: https://github.com/pnp/powershell/blob/dev/samples/Provisioning.SelfHostedWithAzureWebJob/ReadMe.md Initializes the site directory by connecting to the tenant and applying the base provisioning template. ```powershell Connect-PnPOnline -Url https://.sharepoint.com(/sites/sitecollection) Apply-PnPProvisioningTemplate -Path .\Templates\SiteDirectory\sitedirectory.xml ``` -------------------------------- ### Start-PnPTraceLog Examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Start-PnPTraceLog.md Various ways to configure trace logging, including file output and console/stream redirection. ```powershell Start-PnPTraceLog -Path ./TraceOutput.txt ``` ```powershell Start-PnPTraceLog -Path ./TraceOutput.txt -Level Debug ``` ```powershell Start-PnPTraceLog -WriteToConsole -WriteToLogStream -Level Debug ``` ```powershell Start-PnPTraceLog -WriteToConsole -Level Debug ``` -------------------------------- ### Get Event Receiver by ID Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPEventReceiver.md Retrieves a specific event receiver using its unique GUID. Ensure the GUID is correct for the desired event receiver. ```powershell Get-PnPEventReceiver -Identity fb689d0e-eb99-4f13-beb3-86692fd39f22 ``` -------------------------------- ### Parameter Configuration Examples Source: https://github.com/pnp/powershell/blob/dev/documentation/New-PnPSite.md YAML-formatted parameter definitions for New-PnPSite. ```yaml Type: String Parameter Sets: TeamSite Required: True Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ```yaml Type: String Parameter Sets: CommunicationSite, TeamSite, TeamSiteWithoutMicrosoft365Group Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -------------------------------- ### Invoke REST Request to Get Web Properties Source: https://github.com/pnp/powershell/blob/dev/documentation/Invoke-PnPSPRestMethod.md Executes a GET request to the current site collection to retrieve web properties. No special setup is required. ```powershell Invoke-PnPSPRestMethod -Url /_api/web ``` -------------------------------- ### Add-PnPTermToTerm Examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Add-PnPTermToTerm.md Examples demonstrating how to create a child term using a direct ID or by retrieving a parent term object. ```powershell Add-PnPTermToTerm -ParentTermId 2d1f298b-804a-4a05-96dc-29b667adec62 -Name SubTerm -CustomProperties @{"Department"="Marketing"} ``` ```powershell $parentTerm = Get-PnPTerm -Name Marketing -TermSet Departments -TermGroup Corporate Add-PnPTermToTerm -ParentTermId $parentTerm.Id -Name "Conference Team" ``` -------------------------------- ### Example: Download a Specific Report Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPEnterpriseAppInsightsReport.md This example illustrates how to download the content of a report identified by its ReportId. ```powershell Get-PnPEnterpriseAppInsightsReport -ReportId bed8845f-72ba-43ec-b1f3-844ff6a64f28 -Action Download ``` -------------------------------- ### Generate provisioning templates from folders Source: https://github.com/pnp/powershell/blob/dev/documentation/New-PnPSiteTemplateFromFolder.md Examples demonstrating how to create provisioning templates from local folders with varying levels of file filtering, target destination mapping, and metadata assignment. ```powershell New-PnPSiteTemplateFromFolder -Out template.xml ``` ```powershell New-PnPSiteTemplateFromFolder -Out template.xml -Folder c:\temp ``` ```powershell New-PnPSiteTemplateFromFolder -Out template.xml -Folder c:\temp -Match *.js ``` ```powershell New-PnPSiteTemplateFromFolder -Out template.xml -Folder c:\temp -Match *.js -TargetFolder "Shared Documents" ``` ```powershell New-PnPSiteTemplateFromFolder -Out template.xml -Folder c:\temp -Match *.js -TargetFolder "Shared Documents" -ContentType "Test Content Type" ``` ```powershell New-PnPSiteTemplateFromFolder -Out template.xml -Folder c:\temp -Match *.js -TargetFolder "Shared Documents" -Properties @{"Title" = "Test Title"; "Category"="Test Category"} ``` ```powershell New-PnPSiteTemplateFromFolder -Out template.pnp ``` ```powershell New-PnPSiteTemplateFromFolder -Out template.pnp -Folder c:\temp ``` -------------------------------- ### Move Taxonomy Term Set by ID - PnP PowerShell Source: https://github.com/pnp/powershell/blob/dev/documentation/Move-PnPTermSet.md Use this example to move a term set when you have its unique identifier (GUID). Ensure the TermGroup and TargetTermGroup GUIDs are correct. ```powershell Move-PnPTermSet -Identity 81e0a4b8-701d-459c-ad61-a1c7a81810ff -TermGroup 17e16b98-a8c2-4db6-a860-5c42dbc818f4 -TargetTermGroup cf33d1cd-42d8-431c-9e43-3d8dab9ea8fd ``` -------------------------------- ### Build Documentation (Linux/Mac/WSL) Source: https://github.com/pnp/powershell/blob/dev/pages/articles/buildingdocker.md Runs the Docker container to build documentation using DocFX. Mounts the local pages directory into the container. ```bash docker run --rm -it -v $(pwd)/pages:/home pnp.powershell-pages-build /usr/bin/mono /usr/local/lib/docfx/docfx.exe build /home/docfx.json ``` -------------------------------- ### Get List Permissions by Group Name Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPListPermissions.md Retrieves permissions for a SharePoint group identified by its name on a specified list. This example first gets the group's ID using Get-PnPGroup. ```powershell Get-PnPListPermissions -Identity DemoList -PrincipalId (Get-PnPGroup -Identity DemoGroup).Id ``` -------------------------------- ### Add-PnPEventReceiver Examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Add-PnPEventReceiver.md Various examples demonstrating how to add remote event receivers for different SharePoint events and scopes. ```powershell Add-PnPEventReceiver -List "ProjectList" -Name "TestEventReceiver" -Url https://yourserver.azurewebsites.net/eventreceiver.svc -EventReceiverType ItemAdded -Synchronization Asynchronous ``` ```powershell Add-PnPEventReceiver -Name "TestEventReceiver" -Url https://yourserver.azurewebsites.net/eventreceiver.svc -EventReceiverType WebAdding -Synchronization Synchronous ``` ```powershell Add-PnPEventReceiver -Name "TestEventReceiver" -Url https://yourserver.azurewebsites.net/eventreceiver.svc -EventReceiverType ListAdding -Synchronization Synchronous -Scope Site ``` ```powershell Add-PnPEventReceiver -Name "TestEventReceiver" -Url https://yourserver.azurewebsites.net/eventreceiver.svc -EventReceiverType ListDeleted -Synchronization Asynchronous -Scope Web ``` -------------------------------- ### Retrieve File Analytics Data Examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPFileAnalyticsData.md Examples demonstrating how to retrieve analytics data for a file using different parameters. ```powershell Get-PnPFileAnalyticsData -Url "/sites/project/Shared Documents/Document.docx" ``` ```powershell Get-PnPFileAnalyticsData -Url "/sites/project/Shared Documents/Document.docx" -LastSevenDays ``` ```powershell Get-PnPFileAnalyticsData -Url "/sites/project/Shared Documents/Document.docx" -StartDate (Get-date).AddDays(-15) -EndDate (Get-date) -AnalyticsAggregationInterval Day ``` -------------------------------- ### Get only files from a folder using pipeline input Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPFolderItem.md This example retrieves all files within the 'Shared Documents' folder by first getting the folder object and piping it to Get-PnPFolderItem, filtering for item type File. This is useful for chaining operations. ```powershell Get-PnPFolder -Url "Shared Documents" | Get-PnPFolderItem -ItemType File ``` -------------------------------- ### Get All Event Receivers Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPEventReceiver.md Retrieves all registered event receivers on the current web. No specific setup is required beyond connecting to the site. ```powershell Get-PnPEventReceiver ``` -------------------------------- ### Get a folder by its URL Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPFolder.md Retrieves a specific folder by providing its URL. The URL can be relative to the current web or a server-relative URL starting with a managed path. ```powershell Get-PnPFolder -Url "Shared Documents" ``` ```powershell Get-PnPFolder -Url "/sites/demo/Shared Documents" ``` -------------------------------- ### Parameter configuration examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Add-PnPEntraIDGroupOwner.md Configuration blocks for the cmdlet parameters. ```yaml Type: PnPConnection Parameter Sets: (All) Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ```yaml Type: EntraIDGroupPipeBind Parameter Sets: (All) Required: True Position: Named Default value: None Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` ```yaml Type: String[] Parameter Sets: (All) Required: True Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -------------------------------- ### Get All Apps from Tenant App Catalog Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPApp.md Retrieves all available apps from the tenant app catalog. This command lists the installed version in the current site. ```powershell Get-PnPApp ``` -------------------------------- ### Get Web Alerts by User ID Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPWebAlert.md Retrieves alerts associated with a specific user, identified by their unique GUID. This method is precise for user-specific alert retrieval. ```powershell Get-PnPWebAlert -UserId 12345678-90ab-cdef-1234-567890abcdef ``` -------------------------------- ### Get All Content Types Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPContentType.md Retrieves a listing of all available content types within the current web context. No specific setup is required beyond connecting to a site. ```powershell Get-PnPContentType ``` -------------------------------- ### Create a new list with New-PnPList Source: https://github.com/pnp/powershell/blob/dev/documentation/New-PnPList.md Examples demonstrating the creation of different list types and configurations using the New-PnPList cmdlet. ```powershell New-PnPList -Title Announcements -Template Announcements ``` ```powershell New-PnPList -Title "Demo List" -Url "lists/DemoList" -Template Announcements ``` ```powershell New-PnPList -Title HiddenList -Template GenericList -Hidden ``` -------------------------------- ### Get Site Design Rights by Identity Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPSiteDesignRights.md Retrieves the principals with design rights for a specific site design using its GUID. Ensure you have the correct Site Design ID. ```powershell Get-PnPSiteDesignRights -Identity 5c73382d-9643-4aa0-9160-d0cba35e40fd ``` -------------------------------- ### Get Members of All Groups in Site Collection Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPGroupMember.md This example retrieves all members from every group present in the current SharePoint site collection by piping the output of Get-PnPGroup to Get-PnPGroupMember. ```powershell Get-PnPGroup | Get-PnPGroupMember ``` -------------------------------- ### Parameter Configuration Examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Add-PnPTermToTerm.md YAML-formatted parameter definitions for the cmdlet. ```yaml Type: Guid Parameter Sets: (All) Required: True Position: Named Default value: None Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` ```yaml Type: String Parameter Sets: (All) Required: True Position: Named Default value: None Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` ```yaml Type: String Parameter Sets: (All) Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ```yaml Type: Guid Parameter Sets: (All) Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ```yaml Type: Int32 Parameter Sets: (All) Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ```yaml Type: Hashtable Parameter Sets: (All) Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ```yaml Type: Hashtable Parameter Sets: (All) Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ```yaml Type: PnPConnection Parameter Sets: (All) Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -------------------------------- ### Get Specific Event Receiver from a List by ID Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPEventReceiver.md Retrieves a specific event receiver from a given list using its GUID. This combines list filtering with identity filtering. ```powershell Get-PnPEventReceiver -List "ProjectList" -Identity fb689d0e-eb99-4f13-beb3-86692fd39f22 ``` -------------------------------- ### Get External Users from Third Page Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPExternalUser.md Retrieves two external users starting from the third page of the collection. Useful for paginating through large lists of external users. ```powershell Get-PnPExternalUser -Position 2 -PageSize 2 ``` -------------------------------- ### Parameter Configuration Examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPFileAnalyticsData.md YAML-formatted parameter definitions for the cmdlet. ```yaml Type: String Parameter Sets: (All) Aliases: ServerRelativeUrl, SiteRelativeUrl Required: True Position: 0 Default value: None Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` ```yaml Type: SwitchParameter Parameter Sets: All analytics data Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ```yaml Type: SwitchParameter Parameter Sets: Analytics by specific intervals Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ```yaml Type: DateTime Parameter Sets: Analytics by date range Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ```yaml Type: DateTime Parameter Sets: Analytics by date range Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ```yaml Type: DateTime Parameter Sets: Analytics by date range Required: False Position: Named Default value: Day Accept pipeline input: False Accept wildcard characters: False ``` ```yaml Type: PnPConnection Parameter Sets: (All) Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -------------------------------- ### Retrieve All Microsoft 365 Groups Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPMicrosoft365Group.md Use this command to retrieve all Microsoft 365 Groups in your tenant. No specific setup is required beyond having the PnP.PowerShell module installed and connected. ```powershell Get-PnPMicrosoft365Group ``` -------------------------------- ### Get all files and folders in the root web Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPFolderItem.md Use this command to list all files and folders in the root of the current web. No specific setup is required beyond connecting to the site. ```powershell Get-PnPFolderItem ``` -------------------------------- ### Parameter Configuration Examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Add-PnPMicrosoft365GroupOwner.md YAML-based configuration details for the cmdlet parameters. ```yaml Type: PnPConnection Parameter Sets: (All) Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ```yaml Type: Microsoft365GroupPipeBind Parameter Sets: (All) Required: True Position: Named Default value: None Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` ```yaml Type: String[] Parameter Sets: (All) Required: True Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -------------------------------- ### Remove a Teams Team by ID Source: https://github.com/pnp/powershell/blob/dev/documentation/Remove-PnPTeamsTeam.md Use this example to remove a specific Microsoft Teams Team by providing its unique GUID. Ensure you have the necessary Microsoft Graph API permissions. ```powershell Remove-PnPTeamsTeam -Identity 5beb63c5-0571-499e-94d5-3279fdd9b6b5 ``` -------------------------------- ### Get Classic Web Templates for a Specific Locale Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPWebTemplates.md Retrieve classic web templates filtered by a specific Locale ID (LCID). For example, LCID 1033 corresponds to English. ```powershell Get-PnPWebTemplates -LCID 1033 ``` -------------------------------- ### Add-PnPWikiPage Example Source: https://github.com/pnp/powershell/blob/dev/documentation/Add-PnPWikiPage.md Creates a new wiki page at the specified server-relative URL with initial content. ```powershell Add-PnPWikiPage -PageUrl '/sites/demo1/pages/wikipage.aspx' -Content 'New WikiPage' ``` -------------------------------- ### Get a Specific Term Set by ID Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPTermSet.md Retrieves a specific term set using its unique identifier (GUID) from a given term group. This method is precise and avoids ambiguity. ```powershell Get-PnPTermSet -Identity ab2af486-e097-4b4a-9444-527b251f1f8d -TermGroup "Corporate" ``` -------------------------------- ### Configure Sensitivity and Visuals Source: https://github.com/pnp/powershell/blob/dev/documentation/Set-PnPList.md Examples for setting sensitivity labels and customizing list icons and colors. ```powershell Set-PnPList -Identity "Demo List" -DefaultSensitivityLabelForLibrary "Confidential" ``` ```powershell Set-PnPList -Identity "Demo List" -Color Green -Icon "Plane" ``` -------------------------------- ### Get Members of Groups Matching a Pattern Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPGroupMember.md This command retrieves members from SharePoint groups whose names start with 'Marketing'. It uses a filter on the group titles before fetching the members. ```powershell Get-PnPGroup | ? Title -Like 'Marketing*' | Get-PnPGroupMember ``` -------------------------------- ### Parameter Configuration Examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Add-PnPMasterPage.md YAML-formatted parameter definitions for the Add-PnPMasterPage cmdlet. ```yaml Type: PnPConnection Parameter Sets: (All) Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ```yaml Type: String Parameter Sets: (All) Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ```yaml Type: String Parameter Sets: (All) Required: True Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -------------------------------- ### Get All Apps from Site Collection App Catalog Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPApp.md Retrieves all available apps from the site collection scoped app catalog. This command lists the installed version in the current site. ```powershell Get-PnPApp -Scope Site ``` -------------------------------- ### Retrieve All Image Renditions - PnP PowerShell Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPPublishingImageRendition.md Use this command to get a list of all configured image renditions in your SharePoint site. No specific setup is required beyond connecting to your site. ```powershell Get-PnPPublishingImageRendition ``` -------------------------------- ### Apply Site Template Examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Invoke-PnPSiteTemplate.md Common usage patterns for applying site templates using different parameters and sources. ```powershell Invoke-PnPSiteTemplate -Path template.xml -Url https://tenant.sharepoint.com/sites/sitename ``` ```powershell Invoke-PnPSiteTemplate -Path template.xml ``` ```powershell Invoke-PnPSiteTemplate -Path template.xml -ResourceFolder c:\provisioning\resources ``` ```powershell Invoke-PnPSiteTemplate -Path template.xml -Parameters @{"ListTitle"="Projects";"parameter2"="a second value"} ``` ```powershell Invoke-PnPSiteTemplate -Path template.xml -Handlers Lists, SiteSecurity ``` ```powershell Invoke-PnPSiteTemplate -Path template.pnp ``` ```powershell Invoke-PnPSiteTemplate -Path "https://tenant.sharepoint.com/sites/templatestorage/Documents/template.pnp" ``` ```powershell $handler1 = New-PnPExtensibilityHandlerObject -Assembly Contoso.Core.Handlers -Type Contoso.Core.Handlers.MyExtensibilityHandler1 $handler2 = New-PnPExtensibilityHandlerObject -Assembly Contoso.Core.Handlers -Type Contoso.Core.Handlers.MyExtensibilityHandler2 Invoke-PnPSiteTemplate -Path NewTemplate.xml -ExtensibilityHandlers $handler1,$handler2 ``` ```powershell Invoke-PnPSiteTemplate -InputInstance $template ``` ```powershell Invoke-PnPSiteTemplate -Path .\template.xml -TemplateId "MyTemplate" ``` -------------------------------- ### Retrieve Microsoft 365 Groups by Mail Nickname Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPMicrosoft365Group.md Gets Microsoft 365 Groups where the email address starts with the provided mail nickname. The `$groupSiteMailNickName` variable should hold the relevant nickname. ```powershell Get-PnPMicrosoft365Group -Identity $groupSiteMailNickName ``` -------------------------------- ### Build Documentation (Windows CMD) Source: https://github.com/pnp/powershell/blob/dev/pages/articles/buildingdocker.md Runs the Docker container to build documentation using DocFX on Windows CMD. Mounts the local pages directory into the container. ```bat docker run --rm -it -v %cd%\pages:C:\workplace pnp.powershell-pages-build powershell -c Start-Process -NoNewWindow -FilePath $env:TEMP\docfx\docfx.exe -ArgumentList build, C:\workplace\docfx.json -Wait ``` -------------------------------- ### Get folders in a specific folder by Identity Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPFolderInFolder.md Retrieves folders located within a specified folder, identified by its name. This example targets the 'Shared Documents' folder at the root of the current web. ```powershell Get-PnPFolderInFolder -Identity "Shared Documents" ``` -------------------------------- ### Add-PnPPageSection Examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Add-PnPPageSection.md Various examples demonstrating how to add different types of sections, including column layouts, emphasis, and collapsible settings. ```powershell Add-PnPPageSection -Page "MyPage" -SectionTemplate OneColumn ``` ```powershell Add-PnPPageSection -Page "MyPage" -SectionTemplate ThreeColumn -Order 10 ``` ```powershell $page = Add-PnPPage -Name "MyPage" Add-PnPPageSection -Page $page -SectionTemplate OneColumn ``` ```powershell $page = Add-PnPPage -Name "MyPage" Add-PnPPageSection -Page $page -SectionTemplate OneColumn -ZoneEmphasis 2 ``` ```powershell $page = Add-PnPPage -Name "MyPage" Add-PnPPageSection -Page $page -SectionTemplate OneColumnVerticalSection -Order 1 -ZoneEmphasis 2 -VerticalZoneEmphasis 3 ``` ```powershell $page = Add-PnPPage -Name "MyPage" Add-PnPPageSection -Page $page -SectionTemplate FlexibleLayoutSection -Order 1 -ZoneReflowStrategy LeftToRight ``` ```powershell $page = Add-PnPPage -Name "MyPage" Add-PnPPageSection -Page $page -SectionTemplate TwoColumn -Order 1 -Collapsible -DisplayName "My Collapsible Section" -IsExpanded ``` -------------------------------- ### Parameter configuration examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Add-PnPHtmlPublishingPageLayout.md Configuration details for cmdlet parameters including type and requirement status. ```yaml Type: String Parameter Sets: (All) Required: True Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ```yaml Type: PnPConnection Parameter Sets: (All) Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -------------------------------- ### Get Tenant-Scoped Azure ACS Principals Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPAzureACSPrincipal.md Retrieves Azure ACS principals installed in the entire tenant. This operation can be resource-intensive and may take time to complete. The 'ValidUntil' property will be populated. ```powershell Get-PnPAzureACSPrincipal -Scope Tenant ``` -------------------------------- ### Create a file sharing link with PowerShell Source: https://github.com/pnp/powershell/blob/dev/documentation/Add-PnPFileUserSharingLink.md Examples demonstrating how to create view-only and editable sharing links for a specified file. ```powershell Add-PnPFileUserSharingLink -FileUrl "/sites/demo/Shared Documents/Test.docx" -Users "john@contoso.onmicrosoft.com","jane@contoso.onmicrosoft.com" ``` ```powershell Add-PnPFileUserSharingLink -FileUrl "/sites/demo/Shared Documents/Test.docx" -Type Edit -Users "john@contoso.onmicrosoft.com","jane@contoso.onmicrosoft.com" ``` -------------------------------- ### Get a Specific Sensitivity Label by ID Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPAvailableSensitivityLabel.md Use this command to retrieve a single Microsoft Purview sensitivity label by providing its unique GUID identifier. This is useful for targeting a specific label. ```powershell Get-PnPAvailableSensitivityLabel -Identity 47e66706-8627-4979-89f1-fa7afeba2884 ``` -------------------------------- ### Add PnPListDesign and create Site Script from a List Source: https://github.com/pnp/powershell/blob/dev/documentation/Add-PnPListDesign.md This example first creates a Site Script from an existing list, then uses that Site Script to create a new List Design. This is a multi-step process piped together. ```powershell Get-PnPList -Identity "My List" | Get-PnPSiteScriptFromList | Add-PnPSiteScript -Title "My List Script" | Add-PnPListDesign -Title "My List" ``` -------------------------------- ### Delete Specific Recycle Bin Item by ID Source: https://github.com/pnp/powershell/blob/dev/documentation/Clear-PnpRecycleBinItem.md Permanently removes a single recycle bin item using its unique identifier. Replace the example GUID with the actual ID of the item to be deleted. ```powershell Clear-PnPRecycleBinItem -Identity 72e4d749-d750-4989-b727-523d6726e442 ``` -------------------------------- ### Get folders using pipeline input Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPFolderInFolder.md This example demonstrates piping a folder object obtained from Get-PnPFolder to Get-PnPFolderInFolder to retrieve all folders within the 'Shared Documents' folder at the root of the current web. ```powershell Get-PnPFolder -Identity "Shared Documents" | Get-PnPFolderInFolder ``` -------------------------------- ### Retrieve Custom Actions Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPCustomAction.md Examples demonstrating how to fetch all custom actions or filter them by specific criteria. ```powershell Get-PnPCustomAction ``` ```powershell Get-PnPCustomAction -Identity aa66f67e-46c0-4474-8a82-42bf467d07f2 ``` ```powershell Get-PnPCustomAction -Scope web ``` -------------------------------- ### Get Sharing Links for a File by Unique Identifier Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPFileSharingLink.md Retrieves sharing links for a file using its unique identifier (GUID). This method works regardless of the file's location within the site. ```powershell Get-PnPFileSharingLink -Identity eff4c8ca-7b92-4aa2-9744-855611c6ccf2 ``` -------------------------------- ### Get List Version Policy - Specific Site Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPListVersionPolicy.md This example shows how to retrieve the version policy settings for a document library located in a different SharePoint site. Provide the full URL of the target site. ```powershell Get-PnPListVersionPolicy -Site "https://contoso.sharepoint.com/sites/project-x" -Identity "Documents" ``` -------------------------------- ### Retrieve site collection app catalogs Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPSiteCollectionAppCatalog.md Examples demonstrating how to fetch site collection app catalogs with various filtering options. ```powershell Get-PnPSiteCollectionAppCatalog ``` ```powershell Get-PnPSiteCollectionAppCatalog -CurrentSite ``` ```powershell Get-PnPSiteCollectionAppCatalog -ExcludeDeletedSites ``` -------------------------------- ### Get URL of First Organizational Asset Library Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPOrgAssetsLibrary.md This example accesses the first organizational asset library from the output of Get-PnPOrgAssetsLibrary and extracts its server-relative URL. This requires the cmdlet to return at least one library. ```powershell (Get-PnPOrgAssetsLibrary)[0].OrgAssetsLibraries[0].LibraryUrl.DecodedUrl ``` -------------------------------- ### Swap Root Site Example Source: https://github.com/pnp/powershell/blob/dev/documentation/Invoke-PnPSiteSwap.md Archives the existing root site and moves a communication site to the root location. ```powershell Invoke-PnPSiteSwap -SourceUrl https://contoso.sharepoint.com/sites/CommunicationSite -TargetUrl https://contoso.sharepoint.com -ArchiveUrl https://contoso.sharepoint.com/sites/Archive ``` -------------------------------- ### Get Microsoft 365 Group Team by ID Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPMicrosoft365GroupTeam.md Retrieves the Microsoft Teams team details for a Microsoft 365 Group identified by its unique ID. Use the -Identity parameter with the group's GUID. ```powershell Get-PnPMicrosoft365GroupTeam -Identity e6212531-7f09-4c3b-bc2e-12cae26fb409 ``` -------------------------------- ### Retrieve provisioning sequences from a tenant template Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPTenantSequence.md Use these examples to extract either all sequences or a specific sequence from a provided template object. ```powershell Get-PnPTenantSequence -Template $myTemplateObject ``` ```powershell Get-PnPTenantSequence -Template $myTemplateObject -Identity "mysequence" ``` -------------------------------- ### Recursively get all items in a specific folder Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPFolderItem.md Retrieves all files and folders, including the contents of any subfolders, within the 'SitePages' folder at the root of the current web. This performs a recursive search starting from the specified folder. ```powershell Get-PnPFolderItem -FolderSiteRelativeUrl "SitePages" -Recursive ``` -------------------------------- ### Add-PnPPlannerTask Examples Source: https://github.com/pnp/powershell/blob/dev/documentation/Add-PnPPlannerTask.md Common usage patterns for creating Planner tasks, including category assignment, user assignment, and object retrieval. ```powershell Add-PnPPlannerTask -Group "Marketing" -Plan "Conference Plan" -Bucket "Todos" -Title "Design booth layout" -AppliedCategories @{"Category1"=$true,"Category3"=$true} ``` ```powershell Add-PnPPlannerTask -PlanId "QvfkTd1mc02gwxHjHC_43JYABhAy" -Bucket "Todos" -Title "Design booth layout" -AppliedCategories @{"Category1"=$true,"Category3"=$true} ``` ```powershell Add-PnPPlannerTask -Group "Marketing" -Plan "Conference Plan" -Bucket "Todos" -Title "Design booth layout" -AssignedTo "user@contoso.com","manager@contoso.com" -AppliedCategories @{"Category1"=$true,"Category3"=$true} ``` ```powershell $task = Add-PnPPlannerTask -Group "Marketing" -Plan "Conference Plan" -Bucket "Todos" -Title "Design booth layout" -AssignedTo "user@contoso.com","manager@contoso.com" -OutputTask ``` -------------------------------- ### Recursively get folders from a specific site-relative URL Source: https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPFolderInFolder.md Retrieves all folders, including those in subfolders, starting from the 'SitePages' folder located at the root of the current web. This uses the -Recurse parameter along with a site-relative URL. ```powershell Get-PnPFolderInFolder -FolderSiteRelativeUrl "SitePages" -Recurse ``` -------------------------------- ### Install-PnPApp Cmdlet Source: https://github.com/pnp/powershell/blob/dev/documentation/Install-PnPApp.md Installs an available app from the app catalog into the current site. ```APIDOC ## Install-PnPApp ### Description Allows to install an available app from the app catalog. ### Parameters - **Identity** (AppMetadataPipeBind) - Required - Specifies the Id or an actual app metadata instance. - **Scope** (AppCatalogScope) - Optional - Defines which app catalog to use. Accepted values: Tenant, Site. Defaults to Tenant. - **Wait** (SwitchParameter) - Optional - If specified the execution will pause until the app has been installed in the site. - **Connection** (PnPConnection) - Optional - Optional connection to be used by the cmdlet. ### Request Example Install-PnPApp -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe -Scope Site -Wait ``` -------------------------------- ### Move Taxonomy Term Set by Name - PnP PowerShell Source: https://github.com/pnp/powershell/blob/dev/documentation/Move-PnPTermSet.md This example demonstrates moving a term set using its human-readable name. This is useful when GUIDs are not readily available. Ensure the names for TermGroup and TargetTermGroup are accurate. ```powershell Move-PnPTermSet -Identity "OperationLevel-1 Test" -TermGroup "FromPowerAutomate" -TargetTermGroup "TargetTermGroup" ``` -------------------------------- ### Configure List Settings Source: https://github.com/pnp/powershell/blob/dev/documentation/Set-PnPList.md Examples demonstrating how to modify list properties such as content types, visibility, versioning, and attachments. ```powershell Set-PnPList -Identity "Demo List" -EnableContentTypes $true ``` ```powershell Set-PnPList -Identity "Demo List" -Hidden $true ``` ```powershell Set-PnPList -Identity "Demo List" -EnableVersioning $true ``` ```powershell Set-PnPList -Identity "Demo List" -EnableVersioning $true -MajorVersions 20 ``` ```powershell Set-PnPList -Identity "Demo Library" -EnableVersioning $true -EnableMinorVersions $true -MajorVersions 20 -MinorVersions 5 ``` ```powershell Set-PnPList -Identity "Demo List" -EnableAttachments $true ``` ```powershell Set-PnPList -Identity "Demo List" -Title "Demo List 2" -Path "Lists/DemoList2" ```