Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
1answer
26 views

Read Error when saving a list as a template in SharePoint Online

I am trying to save a list as a template with data to copy it to other sites for testing. When I attempt to Save the List as a Template, either from the list settings in the web UI, or with the ...
0
votes
1answer
25 views

New-PnPTerm : Specified argument was out of the range of valid values

I want to create a new term using PnP for our sharepoint online tenant, so i tried this PnP script:- PS C:\Windows> Connect-PnPOnline -Url https://****-admin.sharepoint.com PS C:\Windows> New-...
1
vote
2answers
42 views

Migrate a term from sharepoint on-premises to sharepoint online, to have same name & GUID

I have 2 farms sharepoint on-premises 2013 & sharepoint online. where we use to have a license for a third part migration tool, and we have migrated around 70% of the sites, but still the ...
0
votes
0answers
12 views

Editing Content Types in Sub-Folders of a Library

We have 10,000+ documents to update the content type on. We cannot find a way of doing this manually, require some sort of script that would enable us to do this. I have found scripts that change ...
0
votes
0answers
15 views

Get users who have permission through a sharing link Powershell sharepoint Online

I want to generate a report of every document and permissions on it. Permissions contains General Permission and Users who have permission through a sharing link/ or external sharing link. When I run ...
0
votes
0answers
21 views

Combine PnP templates with master template

I would like to create a smart way to manage large templates with as less manual work as possible. So, I created a small script to export different parts of a site collection like: $parts = "Lists","...
0
votes
1answer
42 views

Sharepoint Set-PnpListItem is not updating value of sharepoint list column

i have powershell script of PNP for setting list item value using for loop. $ListItems_Values=(Get-PnPListItem -List fretag%20vrigt -Fields "FileLeafRef").FieldValues foreach ($item in $...
1
vote
1answer
33 views

The workflow is in an invalid state. Please correct it in SharePoint Designer and republish it

I have a SharePoint 2010 workflow created using SharePoint Designer 2013 during migration with Sharegate I get the error below:- The workflow is in an invalid state. Please correct it in SharePoint ...
0
votes
0answers
25 views

Unable to pass Set-PnPListItem a hashtable as value

Set-PnPListItem should set users in list fields but I can't get the format right. Usually, I would set it like documented, i.e. @{"PersonField" = "user1@domain.com","21"}. However, in my case each ...
0
votes
1answer
41 views

Get-PnpListItem HasUniqueRoleAssignments

I'm trying to retrieve list items that have unique role assignments from a list in SharePoint Online using Get-PnpListItem, is this possible? Currently this property is empty when using Get-...
1
vote
1answer
50 views

Update a site column Display name using PnP, to allow me to use existing Display Name

I am working on sharepoint online classic team site and i created a new site column using the site columns UI, as follow:- where the site column gets its display name and internal name as "...
0
votes
0answers
27 views

How to access the Security trim for SharePoint Online using Powershell

I have been trying to access the securitytrim (_layouts/15/SiteNavigationSettings.aspx)context under the sitenavigationsettings page in sharepoint online. I can do them easily for the on premise ...
0
votes
1answer
29 views

How to run a report in a site collection that lists every site w/ users - Full Control

We are implementing a SharePoint based Knowledge Base. In each site collection, we need to deploy one or more "Knowledge Libraries" ... This is a document library that has a group of users with ...
1
vote
1answer
36 views

Add-PnPNavigationNode - How to set node order?

Quick question: Does anyone know of a way to change the order of the nodes in let's say the QuickLaunch nav when adding them via Add-PnPNavigationNode? I only know of the -first parameter. Thanks a ...
0
votes
0answers
16 views

Get-PnPProvisioningTemplate : Get additional pages from Pages library as a part of the XML file

How can i get the pages from Pages library as a part of the XML file?
0
votes
0answers
12 views

SharePoint Online- Remove-PnpFile question

I have a script that is working to download files from an online SharePoint Document Library to a network drive. Now I just need to be able to delete the files that have already been downloaded from ...
1
vote
1answer
29 views

To check who is running scripts in On premise farm

Is there any way to get detailed report of who is running CSOM/JSOM scripts in SharePoint 2013 environment and what those scripts are doing?
0
votes
1answer
41 views

Get navigation nodes from top navigation in hub (3 levels)

I'm using PowerShell ISE and SharePointPnPPowerShellOnline to get the TopNavigationBar navigation nodes from a hub site. I want all nodes in all levels. The navigation is 3 levels as you can see on ...
1
vote
1answer
41 views

PowerShell script to get site collection administrators, site owners in SharePoint 2013 CSOM

i want PowerShell script for SharePoint 2013 CSOM to get below details site collection administrators site owners Site is multilingual or not Please assist.
1
vote
1answer
45 views

SPO vs PnP on classic / modern experience

Are there any limitations using SPO managment shell commands or PnP commands to manage SharePoint Online site, based on classic or modern experience? Problem underneath the question - I have a ...
2
votes
2answers
60 views

Pnp powershell asking credentials again and again

In PnP PowerShell for SharePoint 2013 site, how to give credentials only once, so that it will not ask credentials again while connecting to different site collections coming from a CSV file input. ...
0
votes
1answer
24 views

One line of code changed from Pnp to CSOM

I have this line of code made with PnP. (Get-PnPList | ? {$_.Title -like "Stand-By*"} | select Title).count But I need it change too CSOM code. I don't know how to do that/ Gr. P
0
votes
1answer
39 views

Add owner to a newly provisioned ModernTeamSite using PowerShell

I have made powershell script to provision modern team and communication sites. I have a share point list where user selects relevant information for this site. The user also selects the owner and ...
0
votes
0answers
12 views

Provision a list with attached content type and site columns

I have a custom content type defined in the contenthub, with attached custom site columns. I want to provision a list (via site script and site design). But with the solution I have, the content type ...
2
votes
0answers
57 views

Migrating the Rating for our discussion board list from on-premises to online

I have a team site inside our sharepoint farm 2013. and the team site contain a Discussion board list which have rating enabled. now using a third party tool named share-gate i migrated the team site ...
0
votes
1answer
31 views

debugging remote event receiver using service bus not working

My scenario is i had a working application that i was able to debug perfectly some month back using service bus but is not working anymore. I don't have any errors and none of my breakpoints are ...
2
votes
1answer
92 views

How to get a CSV-file from a query on Sharepoint lists with PnPPowershell

I have 46 lists on my online sharepoint environment. I want a list in powershell of the last date of all the sharepoint lists. Here is a line of code which I have for every list: write-host "MYLIST: "...
1
vote
0answers
31 views

Compact code for generating report for all groups all members within a site collection

I would like to create a report that contains all subsites and all associated groups and members. This is what I have so far: Get-PnPGroup -PipelineVariable g | Get-PnPGroupMembers | ForEach { [...
6
votes
1answer
158 views

How i can verify that our migrated “Contribute” permission level is exactly the same as the source Contribute permission

I did a migration from SharePoint on-premises 2013 to SharePoint online, using a third party tool, as follow:- The source on-premises site collection is a team site that have publishing features ...
3
votes
1answer
51 views

Sharepoint Design schema JSON for LayoutWebpartsContent

I am Searching for JSON format and documentation of creating a page with web parts in it using Sharepoint Design scripts JSON. After googling, I got the Schema for creating the page but for adding ...
1
vote
1answer
68 views

PnP powershell provision Site with webpart

I am dynamically creating sites (Modern sites/pages) and I want to add embed webpart with embedded code each time a site gets created. How can I do that with PnP Powershell script?
1
vote
1answer
277 views

Could not authenticate to SharePoint Online using OAuth 2.0

I am using following commands to connect to my SharePoint Online environment. Connect-SPOService -Url "https://testdomain.sharepoint.com/sites/test1" Connect-PnPOnline -Url "https://testdomain....
1
vote
1answer
19 views

Word.Application ComObject on Powershell Cannot Open File from SharePoint Online

I'm writing a PowerShell script to update a Word document's content in the SharePoint Online Document Library. Below is the script so far. The issue is the $document variable value is null when ...
0
votes
1answer
19 views

To check a site collection contains variation or not using powershell

We are migrating to SharePoint Online and we want to check that which all sites are using variations in SharePoint 2013. Is it correct that if a site contains variation labels then that site is using ...
0
votes
1answer
47 views

Set/Edit multi line column: user/date entry in SP Online

I got a multi line column('Comment') which is set up to add changes/new entries. When an entry is added, the date and user appears on the left side. I am able to add entry using Set-PnPListItem, but ...
1
vote
1answer
23 views

Error when trying to show a site column in edit and display forms “Method invocation failed because doesn't contain a method named 'ShowInEditForm'.”

i am working on an online classic team site, and i have a site column named "AutomaticallyCreated" which is set to hidden inside create,edit and display form. now i want to show it inside the Edit and ...
0
votes
1answer
50 views

PNP script for all users with Full Control within a Site collection's sub-sites

Via PNP/CMOS, we are looking to export all users that are of Full Control permission level in an on-premise site collection. This site collection could have 300+ sub-sites. We are trying to figure ...
0
votes
2answers
108 views

Can i using PnP script Update our custom list items “Status” field without affecting the ModifiedBy and Modifed fields

we have a sharepoint online classic team site. and inside the classic team site, we have a custom list titled "Project Management" which have a custom drop down field named "ProjectStatus", which have ...
0
votes
0answers
26 views

PnP MIME Type configuration allowing browser view

I would like to view trusted PDF or HTML files directly in browser without downloading them. Is there a way to activate browser view from any PnP library (SharePointPnPPowerShell say)? The examples ...
1
vote
1answer
68 views

Get-PNPWorkflowInstance object returned

New to Powershell so keep this in mind....I've successfully used powershell scripts to do work on my Sharepoint site. What I'm unclear on is this. Given certain functions I'm pretty certain an ...
1
vote
1answer
24 views

Can the code from Microsoft.Online.SharePoint.PowerShell be translated to PnPPowerShell

I would like to translate the code below that is made with the commands from module Microsoft.Online.SharePoint.PowerShell to PnpPowerShell. Is that possible? #Get the Target List $list = $web.Lists["...
1
vote
1answer
23 views

Powershell script to check if the migrated document libraires contain all the on-premises verisons

we want to migrate our sharepoint on-premises 2013 sit e to SharePoint online. and some document libraries contain very important documents to us. where these docuemnt libraries have minor and major ...
0
votes
1answer
51 views

Powershell script to find sites having property bag in sharepoint 2013

We are using SharePoint 2013 and there is one property bag having key as "DATA". i want a powershell script to know in what all sites this "DATA" property is there and what is the value of this in ...
0
votes
1answer
170 views

Picture library thumbnail url

Is there any way in powershellscript to get the thumbnail url from Picture library.? Actually i wan to use in custom search display template to get the thumbnail image.
0
votes
1answer
29 views

How to export a SP list with a view called “MyView” with PnPPowershell?

Hi I have this code which work great. But now I want to export the list in a certain view I have created. How can I do that. $hashTable = @() $items = Get-PnpListItem -List "MySchedule" foreach($item ...
1
vote
1answer
42 views

Retrieve Items in Video Document Library using PowerShell

I'm wanting to retrieve all items within a Video Library on SharePoint and grab the owners/Created By list and all that I haven't been able to target videos only. I'm able to pull in all of the ...
2
votes
3answers
28 views

Managed metadata service creation in SharePoint Online

How to create managed metadata service in SharePoint Online for creating a separate term store. Is there any powershell script as i cant see any out of the box option in admin centre.
0
votes
1answer
12 views

SP.Response.UI doesn't work for Oslo masterpage

I have provisioned a site and have set it up to use the SP.Responsive.UI (PNP). But what i noticed is when its switched to the Oslo masterpage it breaks the site and the OOTB menus and context menu ...
1
vote
1answer
122 views

Insert LookUp column in list using Sharepoint PNP PowerShell

I've this code bellow OfertaParticulares Connect-PnPOnline -Url https://test.sharepoint.com/sites/test/Negocio/OfertaParticulares -Credentials (Get-Credential) $listName="Páginas" $fieldName="...
1
vote
3answers
205 views

Configure LookUp field using Sharepoint PNP Powershell

I create a column "TitleLookUp" of type LookUp, how can I access the column and configure the information via PNP PowerShell?