Skip to main content

Questions tagged [pnp-powershell]

PowerShell commands that allows you to perform complex provisioning and artifact management actions towards SharePoint. The commands use CSOM and can work against both SharePoint Online as SharePoint On-Premises.

Filter by
Sorted by
Tagged with
0 votes
0 answers
25 views

Describe the scenario We are working on a SharePoint 2016 → SharePoint Online migration project and need to modernize publishing pages (including blog pages and web part pages) as part of the ...
Pallavi Gl's user avatar
0 votes
0 answers
42 views

I need to migrate SharePoint 2016 on-premises publishing pages to SharePoint Online, in the process transforming them to Modern pages. Prior to September 2024 the general approach was like the start ...
Paul's user avatar
  • 1
0 votes
0 answers
30 views

Morning All, Using PnP PowerShell how can I find the sharepoint group(s) assigned to a specific folder? I thought the following code would work but it doesn't: #Get the WorkSet folder from URL $...
Grot's user avatar
  • 1
0 votes
0 answers
21 views

I want to get a better handle of Set-PnPFolderPermission and Set-PnPListItemPermission. What are experienced PnP PowerShell programmer's take on the differences between Set-PnPFolderPermission and Set-...
Grot's user avatar
  • 1
0 votes
0 answers
53 views

I'm trying to get the below powershell script to work but getting this error : The term 'Get-PnPRoleAssignment' is not recognized as a name of a cmdlet It seems this command does not exist and if not ...
naijacoder's user avatar
  • 4,368
0 votes
1 answer
34 views

Using Get-PnPListItemVersion i'm trying to get values from a SharePoint multi-choice lookup column but i'm having difficulty inspecting the field returned by Get-PnPListItemVersion $versions = Get-...
neptr's user avatar
  • 113
1 vote
1 answer
370 views

I am facing error:"Forbidden (403): Insufficient privileges to complete the operation." while executing command $groupObj = Get-PnPMicrosoft365Group | Where-Object {$_.DisplayName -eq $group}...
Swetha's user avatar
  • 409
0 votes
1 answer
101 views

I'm looking for a way to import a sharepoint list of a sharepoint site and export it into another destination. I looked at this Powershell PnP commands I don't want the CopyList as i need to have the ...
naijacoder's user avatar
  • 4,368
0 votes
1 answer
63 views

Any ideas why this code is not executing as expected? I tried adding a sleep after the Copy-PnPList but still didn't work. try { #Connect to the template site $templateSiteConnection =...
SPGrunt's user avatar
0 votes
0 answers
37 views

Here is my script, but I cant capture file versions. #Config Variables $TenantAdminURL = "https://admin.sharepoint.com" $CSVFilePath = "C:\Temp\RESTART.csv" #Get the Root Web #$Web ...
Nightwing2099's user avatar
0 votes
0 answers
80 views

I'm trying to find an archiving solution for my company that's easier than using the GUI and scrolling through large amounts of files and folders and manually using the Move To button. I have written ...
user124837's user avatar
0 votes
0 answers
31 views

I'm following this tutorial to copy some fields into other fields in my list. Overall it is working great, but when I copy a user field sometimes the pnp powershell throws "WARNING: No values ...
Rothrock's user avatar
  • 1,602
0 votes
1 answer
93 views

I have 2 tenants; Source & Destination. I export the site from source and try to invoke it inside the destination, but it failed, here are the steps i followed:- Connect-PnPOnline -Url "...
microsoftdeveloperdesigner's user avatar
0 votes
1 answer
500 views

I want to copy one site collection from one tenant to another, so on the source tenant, I created this App Registering and I grant it full control on SharePoint:- And I define to use secret for the ...
microsoftdeveloperdesigner's user avatar
0 votes
1 answer
106 views

I am using PnP.Powershell version 2.12.0. I am trying to set values of two new managed metadata columns in a list using values from other columns. But I keep getting the following error: Cannot bind ...
Dan's user avatar
  • 3
2 votes
1 answer
288 views

I use Connect-PnpOnline with -interactive because my account uses MFA. I can connect and run my scripts against my site. I have a script that runs very long. During the execution of the script the ...
Danny's user avatar
  • 570
2 votes
1 answer
413 views

In Powershell, after running the Connect-PnPOnline -Url https://yourtenant.sharepoint.com/sites/xyz -UseWebLogin and Get-PnPUser -WithRightsAssigned commands, I can get the list of all users that have ...
Lorren112's user avatar
0 votes
1 answer
180 views

We have 5000+ SharePoint Online sites in our tenant where i have to change the Site Version setting to automatic for all existing document libraries. I am using the below to connect using an Azure App ...
user3436773's user avatar
1 vote
1 answer
457 views

Before I begin, I need to tell you that I am an absolute beginner when it comes to Powershell, this is my first attempt at it and I've mostly been trying to use AI to help me get it running. I am ...
Szymciak's user avatar
0 votes
0 answers
162 views

I'm using PowerShell to update QuickLinks webpart in a Modern SP environment. Updating a "Page" works just fine using the set-pnppagewebpart cmdlet. However, when I try to use the same ...
Pablo's user avatar
  • 75
1 vote
0 answers
123 views

Requirement: One of our Clients is working on correcting permissions on there tenant and thus needs to remove "Everyone" and "Everyone except external users" from identified places ...
SiD's user avatar
  • 93
0 votes
1 answer
145 views

I have a classic page in SharePoint Online. It's a standard homepage from a teamsite in a classic web and I want to add a list webpart to it. When the web is created, the Home.aspx has three webparts, ...
Papageno's user avatar
  • 343
1 vote
1 answer
172 views

I am trying to convert On-Premise (SharePoint 2013) Classic Publishing pages to SharePoint online (Modern) pages. I am trying to follow the example given in below article: https://pnp.github.io/script-...
Gopal Tiwari's user avatar
0 votes
0 answers
55 views

I can connect via PnP online using a certificate successfully but to perform any actions I get access denied. This is despite having full control or read and write (I tried both) permissions via the ...
svge's user avatar
  • 1
0 votes
2 answers
2k views

I have a custom list named WorkOrders inside our SharePoint online tenant. now this custom list contain around 10K items. and i want to do some modifications to existing list items, as follow:- 1- I ...
microsoftdeveloperdesigner's user avatar
2 votes
2 answers
559 views

When I programmatically change the title of a group-based site using PowerShell, the site gets the new name, but the associated Microsoft 365 group does not. Furthermore, when you log in to the site, ...
Janet's user avatar
  • 185
0 votes
2 answers
266 views

How can I count all files recursive inside a specific folder in a document library by powershell? So he needs to count also the files inside the subfolders recursive.
KEM's user avatar
  • 15
0 votes
1 answer
262 views

I have 2 SharePoint Online tenants which both have a modern communication sites. now i used this command to get the source site template:- PS C:\Users\mohan> Connect-PnPOnline -Url "https://...
microsoftdeveloperdesigner's user avatar
0 votes
2 answers
530 views

I come from sharepoint 2019 and i try to import data from excel to a list It's working fine for date and text datas But i don't understand about unique choice, checkbox or People picker fields. my ...
Poule's user avatar
  • 3
0 votes
1 answer
283 views

I am in need of some critical automation for SharePoint Online and even though i'm able to perform all tasks, i'm restricted from using the App ID to "share a link" for a file in a Document ...
powershellFan83's user avatar
0 votes
0 answers
565 views

I have been using the Copy-PnPFolder to copy files between sharepoint sites. But just suddenly i started receiding this error : The remote server returned an error : (404) Not found This is how i ...
naijacoder's user avatar
  • 4,368
0 votes
1 answer
494 views

I'm trying to use the command below to copy local files to SharePoint. Copy-PnPFolder -LocalPath "C:\Projects\BS\Banner.zip" -TargetUrl "https://Demo.sharepoint.com/sites/Demo/Documents&...
naijacoder's user avatar
  • 4,368
0 votes
1 answer
3k views

I'm trying to run my Powershell PnP script using ClientId and ClientSecret instead of UseWebLogin. I already created an Azure Application ID using this tutorial (but skipping the certificate part for ...
Dylan666's user avatar
0 votes
1 answer
64 views

I'm downloading files from a SharePoint site to a local folder. I can connect and download files with no issue, but I go to remove them, I'm getting Error: Cannot compare "PnP.PowerShell.Commands....
rsford31's user avatar
0 votes
2 answers
279 views

Current system runs over user + plain password authentication. 2MFA is coming so I want replace it by client/secret solution. I have did an app in Azure and things like read/write SharePoint is ...
user112964's user avatar
0 votes
2 answers
906 views

I'm looking for a way to automate emptying the recycling bins (1st & 2nd stage) from all sites in our SharePoint (Online) collection. From searching, I've found solutions that no longer work (...
FotS's user avatar
  • 1
1 vote
1 answer
180 views

I'm using the cooy-pnpfile command to copy content from a specific folder in a doc lib to another doc lib I don't want it to create a top folder in destination but just copy the folders and files. Is ...
naijacoder's user avatar
  • 4,368
0 votes
1 answer
170 views

i created a taxonomy column to replace an old choice column. I wrote a PowerShell script, which maps the value to the term and updates the item using the PnP PowerShell Cmdlets. The value is there in ...
Johannes's user avatar
1 vote
1 answer
559 views

I had a request from some co-workers to build them a PowerShell to search sites for instances of text that is not accessible so they can replace it. Specifically NA or N/A. I have a PowerShell working ...
OMGDrAcula's user avatar
0 votes
0 answers
334 views

I have the following code and it has been working. Now our company merged and my computer is with the new company domain. New company don't have access to our SharePoint and it seems like it also want ...
maria's user avatar
  • 11
0 votes
1 answer
341 views

My goal is to upload approximately 10,000 folders to a SharePoint library (call it T2) and create a list in SharePoint (say T1) that lists these folders along with other details and their ...
user1375452's user avatar
1 vote
2 answers
2k views

My problem is enabling custom script with DenyAddAndCustomizePages. A two-line script can describe my problem. Background: I was using Set-SPOSite to enable it like this: Set-SPOSite $SiteURL -...
IshRashad's user avatar
0 votes
1 answer
62 views

I created 50 pages using the SharePoint online template called Blank. This has a header / title webpart at the top which we do not want. Does anyone know of a way to remove this webpart from all the ...
Scots_nerd's user avatar
0 votes
0 answers
159 views

We are having some issues querying some lists and libraries and I'm afraid we have stared ourselves blind on the matter. We run the following cmdlet and it throws an error: $listItems = Get-...
Anders Nielsen's user avatar
1 vote
1 answer
109 views

I have an intranet and try to get the statistics of News Posts. I have now this PowerShell script below where I do a search query and get some metadata. Is there some attribute where I can recognize ...
KEM's user avatar
  • 15
1 vote
0 answers
190 views

I have a requirement to move the document set(documents inside) from one library to other within the same site, maintaining all metadata and versions in destination library as well. I tried below ...
Swetha's user avatar
  • 409
1 vote
1 answer
891 views

I'm attempting to create an organizational assets library for use with company branded templates and copilot features. I have successfully run this code on my development tenant, but when attempting ...
Michael Colbs's user avatar
0 votes
2 answers
2k views

We have a SharePoint online document library which contain 40 folders on the root. now i want to count how many nested sub-folders and files each of the 40 folders contain? now in SharePoint the built-...
microsoftdeveloperdesigner's user avatar
1 vote
1 answer
224 views

I have created a script to create number of views in SharePoint, but I am unable to work out the CAML to group by more than one field if it's possible. 1 field being: <GroupBy Collapse="TRUE&...
Bob 's user avatar
  • 13
0 votes
1 answer
219 views

After I successfully call $f=Get-PnpFile -Url $Url if I invoke Get-PnPProperty -ClientObject $f -Property Versions I get an error that the object ID is invalid. Any clue?
Stéphane BARIZIEN's user avatar

1
2 3 4 5
16