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
1answer
17 views

PnP PowerShell - update SharePoint list fields from existing SharePoint list

We need to fetch data from one SharePoint list and then update those fields data into another SharePoint list using PnP PowerShell. Can anyone please guide or share PnP script for us? Thanks in ...
0
votes
0answers
25 views

Can I know which site collection an App Permission was registered at (_layouts/15/AppRegNew.aspx)?

I have many App Permissions which are showing inside my App Permission page, as below:- and as seen here:- but is there a way to know the site/s where this app was registered at using the _layouts/...
0
votes
2answers
23 views

PnP PowerShell command “Add-PnPFieldToContentType” not working in any site collection

I'm trying to use this PnP PowerShell command: Add-PnPFieldToContentType to assign some site columns to a specific content type. I've connected to the site collection using this command: Connect-...
0
votes
1answer
12 views

powershell query row limits for SharePoint online

I am not a super scripter, but I have a requirement run a search query over a site with multiple libraries. The query is for all documents where a specific string (someone's name) appears. I have 2 ...
0
votes
2answers
22 views

How to get all SP Library IDs with PnPOnline useweblogin

Can you help my with this code? #Config Parameters $SiteURL= "https://tenant.sharepoint.com/sites/TestSite1" Try { #Setup the context Connect-PnPOnline -Url $SiteUrl -useweblogin ...
2
votes
1answer
22 views

Not able to browse PnP PowerShell documentation on Microsoft site

I am trying to access PnP PowerShell documentation but not able to find it. Almost all pages are not working. Example: I am trying to access PnP Provisioning template cmdlet documentation which is ...
0
votes
1answer
48 views

The remote server returned an error: (403) Forbidden error coming while running powershell script after migrating SP 2013 site to SharePoint Online

Dear PowerShell Experts, We have below script and working fine on SharePoint 2013 Environment but its not working on SharePoint Online. While running, we are getting error message as "Add-Content ...
0
votes
1answer
27 views

Unable to hide site column from the New form using PnP

I want to hide a site column from the New form, so i tried this PnP script:- PS C:\WINDOWS\system32> Connect-PnPOnline -Url "https://***.sharepoint.com/sites/***/" -UseWebLogin ...
0
votes
1answer
18 views

Register app-only access with REST API

Is there any way to reproduce the app-only access registration using REST process described here: https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/security-apponly-azureacs More ...
0
votes
0answers
22 views

Unable to provision site fields and content type through PNP provisioning

I'm trying to migrate some site structure from SP2013 to SP Online. I have extracted data from the site through Get-PnPProvisioningTemplate. I've cut out all unnecessary stuff and try to Apply-...
0
votes
1answer
8 views

Why my user custom action only runs on system pages?

I've added some scriptlink via Add-PnPJavaScriptLink PnP function, however, this only get«s called when on system pages (/_layouts/..) What am I missing here? The intention is to run some CSS or JS on ...
0
votes
1answer
25 views

I need to get must recent run of a workflow from a SharePoint site using PowerShell

I am trying to get the most recent run time of a list of workflows. I have an export of data that gives me the Site URL and the Subscription ID of the workflow. My thought process is to some how ...
0
votes
4answers
46 views

What Is The Path To A PnPFile In SharePoint?

In the Documents directory in Sharepoint online I have a sub-directory called Development and a file in there called FontDemoInfo.txt. In the browser it looks like: Documents > Development ...
0
votes
1answer
21 views

Can I leverage the built-in Duration Field in a Events List

Trying to add a view to a spo event list that get the total duration of the events in the list. I found a built-in Duration field accessible though PNP Powershell (e.g. $event.fieldValues.Duration) ...
0
votes
2answers
46 views

SharePoint PnP PowerShellOnline - Add-PnPFolder Error “Cannot contact site at the specified URL”

I am using SharePointPnPPowerShellOnline version 3.29.2101.0 and have successfully connected and authenticated to my Teams SP site. However, I get the following error when I try to create SP folders:...
0
votes
0answers
55 views

Recent Upgrade of PnP.Powershell and SharePointPnPPowerShellOnline Modules are causing errors

I recently performed an upgrade of PnP.Powershell and SharePointPnPPowershellOnline Powershell modules due to an error I was getting. I had a few issues and tried a few things to resolve with no ...
0
votes
1answer
17 views

Unable to get the property for ShowInNewForm

i want to know the value for ShowInNewForm for a site column, i tried this PnP:- PS C:\WINDOWS\system32> connect-pnponline "https://***.sharepoint.com/sites/***/" -UseWebLogin PS C:\...
0
votes
1answer
32 views

How to verify retention labels at site level?

In our SharePoint Online, we have n number of sites where retention labels are being assigned for the contents. Though, we are not sure if we have labeled everything and would like to verify what has ...
0
votes
2answers
64 views

“connect-pnponline -PnPO365ManagementShell -launchbrowser”is raising this Error:- “Object reference not set to an instance of an object.”

I am trying to connect to a SharePoint online communication site which have MFA enabled, I tried running this command: PS C:\WINDOWS\system32> connect-pnponline "https://***.sharepoint.com/...
0
votes
1answer
47 views

Get-PnPList cmdlet not returning anything

I'm trying to retrieve information from two columns on a sharepoint list in order to use them in powershell. Here's my code so far: $SiteURL = "https://xxxx.sharepoint.com/sites/xxxxx/" ...
0
votes
1answer
36 views

Get Copy Link Value from Document Library Files

I am in the process of moving files to Sharepoint Online. Some of the files will have a share assigned to them (obtained via the 'Copy Link' option) in the format https://myorg.sharepoint.com/:t:/s/...
1
vote
0answers
34 views

Replace Image in sharepoint Template (.xml) in Powershell

I am new in Powershell code and have a problem about "Replace Image in sharepoint Template (.xml)". I have saved a SPO Team-Website Template (.xml) in my computer through powershell (in ...
0
votes
0answers
29 views

Cannot apply an XML template to a SharePoint site

I am currently trying to use the PowerShell command Apply-PnPProvisioningTemplate to apply an XML template to a SharePoint site: Apply-PnPProvisioningTemplate -Path "<path to the XML file>&...
0
votes
0answers
37 views

Getting Manifest not found for component id errors when adding a custom SPFx webpart to a site

For my SP Online instance, I made a SPFx webpart and when I deploy it to a site, I get the following. I did a non-tenant wide install to the tenant app catalogue. And then I installed the app on my ...
0
votes
1answer
93 views

Connect-PnPOnline through error “The underlying connection was closed: An unexpected error occurred on a receive.”

We have used System.Net.WebRequest for managing FTP files by powershell script. But, we are frequently getting "The underlying connection was closed: An unexpected error occurred on a receive.&...
0
votes
1answer
49 views

How to use Get-PnPUnifiedAuditLog command

I'm using Modern UI for SharePoint Online. I'd like to export audit log using PnP PowerShell. But When I use "Get-PnPUnifiedAuditLog", the following error is occurred: PS C:\Users\hyonta >...
0
votes
2answers
57 views

How to get all column and type and internal name in my site by PnP PowerShell

I'm using ModernUI for SharePoint Online. I'd like to get all List and Library's ColumnName, Type, InternalName in my site by PnP PowerShell. I did some research myself, but I didn't understand, so I ...
1
vote
2answers
42 views

PowerShell - Creating Top Link Navigation

I am able to create a dropdown menu in SharePoint Online using the script below. The results is in the first image, is it possible to create the 2nd image using PowerShell also? #Config Variables $...
2
votes
1answer
192 views

SharePoint Online, how to disable new “Comments” feature?

Anyone know how to turn this OFF? I use my own field to track comments in our document approval system, this new feature confuses users. This icon appears in custom lists: PS: And what is this?
2
votes
1answer
28 views

PowerShell PnP Unable to get file versions in big files

I'm using OneDrive (office 365 account) as a cloud backup, and I got a problem with the versioning system as for big files (outlook .ost and .pst mainly) it keeps generating new versions for the file ...
0
votes
2answers
40 views

How to copy left navigation from sharepoint 2013 to sharepoint online

I am moving the site from on-prime to online. I want to copy the navigation from 2013 to online for the same site using pnp powershell.
1
vote
1answer
26 views

SharePoint “modern” sites classification return empty

Using PNP PowerShell, I am retrieving the SharePoint Site classification. I have set the classification on all 10 sites, but for 5 sites it returns the classification and for remaining it returns ...
0
votes
1answer
117 views

Connect-PnPOnline always returns “…does not match one in the Microsoft account system”

When I try to connect to a SharePoint Online via Powershell (using the script below) I always receive the error... Connect-PnPOnline : The sign-in name or password does not match one in the Microsoft ...
0
votes
2answers
121 views

PnP PowerShell to get all lists

I have a question regarding the PnP Powershell and the usage. So basically, I've created a simple foreach to iterate all subwebs to print a detail froma list. But it does not work as supposed. It ...
0
votes
2answers
45 views

Setting User Permission via Powershell

I am attempting to write a script where if there is a user in SharePoint Online that has Full Control, that it gets updated to a new Full Control - No Subwebs permission level. Despite that it saying ...
0
votes
2answers
27 views

How to extract List Creator using Pnp PowerShell

I'd like to extract the list metadata for SPO site Collection including the list creator using PnP PowerShell. Can anyone help how to get it? Referred the below link but not working. Find List Creator ...
0
votes
2answers
53 views

How to change the HeaderLayoutType to ColorBlock in an existing modern page in SP Online?

If I have an existing page in the site pages library. How can I change the headerlayout type to colorblock? It seems I can specify that when making the page through pnp provisioning or https://docs....
0
votes
1answer
73 views

How to set up service account to run PnP powershell scripts from backend from Flow from SP Online

I am doing SP Online development with SPFx. I have some PnP Powershell scripts I want to run from azure, but I want the end user to be able to trigger it from a flow from triggers like an item create/...
0
votes
1answer
69 views

Moving files from OneDrive to Teams via Powershell

While it is possible to move files between Teams sites and between OneDrive users, it does not seem feasible to move files from Teams to OneDrive and vice versa, using Powershell. The restriction is ...
0
votes
1answer
27 views

Remove a user account from user info list without being a site collection admin

I am trying to remove a cached user account added in more than 18000 sites. for that I have been trying below PNP script: $displayName = "DisplayNameOfAccountThatNeedTobeRemoved" Get-...
0
votes
1answer
36 views

How i can get the total size for all our site collections including OneDrive sites

I want to get the total size for all our SharePoint sites (including OneDrive sites), where i tried to run this PnP command:- Get-PnPTenantSite -IncludeOneDriveSites -Detailed but i could not get the ...
0
votes
1answer
69 views

download large file using PnP

I would like to download large file (12Gb) using PnP since in PnP there is a nice auth method UseWebLogin However from this issue it looks like that it is not supported. Can I somehow overcome this ...
1
vote
2answers
67 views

Add AD Groups to Sharepoint Online Group using CSOM

I have the following situation: AD: Users Groups Sharepoint: Groups The hole point is to add both the users and the groups from AD to Sharepoint. I got adding the users to work using the following ...
2
votes
3answers
119 views

How to delete rows from a SharePoint list using PnP PowerShell?

I am using PnP PowerShell to access the SharePoint Online environment. How can I delete rows of a SharePoint list?
0
votes
2answers
66 views

why i am been automatically login when running this command “Connect-PnPOnline -Url ”https://***.sharepoint.com/sites/ApprovalProcess/“ -UseWebLogin”

I run the following PnP command: Connect-PnPOnline -Url "https://***.sharepoint.com/sites/ApprovalProcess/" -UseWebLogin Now a dialog will open and login me automatically, and when I try to ...
0
votes
1answer
67 views

SharePoint Online : Content types from hub are not publishing to all site collections

I have two questions: we are provisioning around 45,000 site collections (Modern Team site with no office 365 group), majority of site collections are getting content types inherited from content ...
1
vote
1answer
28 views

How to get all list filed information with PnP for SharePointOnline

When I use Get-PnPField It just output Title, InternalName and ID. I'd like to output ColumnType, DefaultValue, Choices etc.. If anyone knows, could you give me an idea? Thank you very much.
0
votes
0answers
38 views

How to check the App Id from the AppTile object in PnP PowerShell for SharePoint Online?

In PnP Powershell, I want to get a list of all my custom deployed web parts from (SPFx) and also check which all sites have them deployed to (they are non tenant wide installs). I have this script so ...
0
votes
2answers
36 views

Does Set-PnPDefaultColumnValues support DateTime field in SharePoint Online document library

I am using Set-PnPDefaultColumnValues to set default values in document library in SharePoint Online and one of the column is DateTime. When I run this cmdlet for DateTime field I don't get any error ...
0
votes
1answer
64 views

PNP Powershell Script Document Library Inventory

Hi I am using this script to return all documents in a site collection. I have some custom columns in the library but I am unsure how to add them to the script, specifically the internal name. Is ...

1
2 3 4 5
11