Stack Exchange Network

Stack Exchange network consists of 174 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

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.

0
votes
0answers
8 views

Export Import Workflow SharePoint Online

I have got created a list workflow in SharePoint Designer for a SharePoint Online Site Collection. Now I want to export this workflow and import it to a new site collection. I found a PnP-PowerShell ...
2
votes
0answers
15 views

Match/move based on data in the title of a document to folder of the same name

So I have a Library with a list of documents. These docments (PDFs) are named in the following format. DeptCode_MgrNumber_MgrLast,MgrFirst_EmpName_634242 I would like to find a way to ...
0
votes
0answers
8 views

Copy managed metadata term as a subterm using powershell?

Is there a way to copy an existing term and demote it to a subterm using Powershell?
2
votes
2answers
55 views

How get columns data from SharePoint document library using powershell

I want to export data from document library column into csv file using PowerShell. In document library i had column name "Post Code" under column i had different post codes as "XXXXX-12-AD-2345, ...
1
vote
0answers
26 views

Put an Image webpart (Image/Image gallery) on the top of a Modern SP page with Powershell (PnP)

I need to communicate an important information (picture) on Team Site homepages so I decided to add on the top of every homepages an Image Webpart (to know : homepages already has some webparts). I ...
1
vote
0answers
9 views

Create Site Policy in SharePoitn Online with PowerShell/CSOM

I was researching for creating Site Policy in SharePoint Online with PowerShell/SharePoint but with no luck. Is it possible with SharePoint Online?
1
vote
2answers
32 views

SharePoint Online - 'Manage files with no checked in version' exceeds 5000 items treshold

I have a problem with thousands of files not being checked in after upload to one of our site collections. I can't open the list of files with no version through the UI because of the exceeded ...
0
votes
1answer
16 views

SharePoint pnp Powershell nocrawl on a list

How can I set a nocrawl on a list using SPPnp powershell? I tried the following but doesnt work: $list = Get-PnPList -Web $Web.Title -Identity $l if($list) { write-host $list.Title $list....
0
votes
1answer
19 views

Dynamic HashTable from a list in PnP PowerShell

Rather than create a static HashTable that is composed of the data from my list, I am looking to make it dynamic, but ran into some difficulty in constructing it. For example: Given that $items is ...
1
vote
2answers
57 views

how to update formula of calculated column using PnP in SharePoint Online

I want to update formula of calculated column using PnP or powershell. please note that i am using SharePoint Online. i tried below but its giving me error. please help. PS C:\Windows\system32> ...
0
votes
1answer
18 views

Set-PnPListItemPermission and Set-PnPListPermission - Does this send out a notification to the user?

I couldn't find in the docs if this was the case or not, I assume not, but I just want to make sure (and I have no test users to test with): If I use Set-PnPListItemPermission or Set-...
1
vote
1answer
11 views

How to differentiate between PNP powersehell command for sharepoint online versus sharepoint 2013

How to differentiate between PNP powershell command for sharepoint online versus sharepoint 2013? I have both installed Thanks in advance
2
votes
1answer
104 views

PnP Poweshell: Get-PnPListItem Restrict to a Specific View

I'm using Get-PnpList and Get-PnpListItem to retrieve all items in a specific list, but I would like to restrict the items to only those in a specific view? Is this possible? Maybe with a CAML query, ...
0
votes
1answer
34 views

Using restore-pnprecyclebinitems for sub-site use only

We have some files missing on a sub-site from which I have tried to use a script to restore. I connect to the context using connect-pnponline giving the specific team address t5\ts1. I confirm ...
0
votes
1answer
38 views

Pnp powershell boolean field

I want to create a boolean site column (yes/no field) througn pnp power shell. I used Add-PnPField command, but how to set default value to "no"
0
votes
1answer
30 views

PnP PowerShell command for Reuse Term

Is anybody know what is the PnP PowerShell command for Reuse Term and Pin Term functionalities?
0
votes
0answers
17 views

Add-PnPContentTypeToList does not add content type when using -web parameter

I am looping through subwebs and am trying to add a content type to a specific list using the code below, but it does not add it. I don't get any errors. Add-PnPContentTypeToList -Web $currentSubWeb -...
2
votes
1answer
58 views

Connect-PnPOnline : The 'Connect-PnPOnline' command was found in the module 'SharePointPnPPowerShell2013', but the module could not be loaded.

I have installed PnP Powershell and I tried to run Connect-PnPOnline, but I got the following error: Connect-PnPOnline : The 'Connect-PnPOnline' command was found in the module '...
1
vote
0answers
17 views

Teams -Reached catch method Error occurred while executing Code: GeneralException Message: Failed to start/restart provisioning of Team InnerError

I was trying to create Teams using Powershell script as below $GroupID = (New-Team -DisplayName $TeamName -AccessType Private -Description $TeamDescription).GroupId in general this code execute well ...
0
votes
0answers
53 views

Copy Sites Pages from one collection to another using PNP

I created over 50 Modern pages in one site collection, to realize they would be better housed in another site collection. Can I copy/move these pages from one collection to another ( or copy/move the ...
0
votes
0answers
32 views

How to specify the format of a URL field using pnp powershell?

I am using pnp-powershell to create a fields and one of them is a Hyperlink Or Picture. Using the script below I don't find a format option. Can anyone tell me how can I specify the format? add-...
1
vote
2answers
53 views

Can i create a custom permission level which allow users to ONLY create an item inside cusotm list. but they can not view,search,edit,delete items

I have a custom list inside our sharepoint online team site. and the team site have the publishing features enabled. the custom list is being used to submit users' feedback. So i want to create a ...
0
votes
1answer
65 views

PNP-PowerShell: Get items based on CreatedBy

I want to get all items(documents or list items) from SharePoint Online site and its sub sites based on createdBy using PnP-Powershell.
1
vote
2answers
77 views

SharePoint OnLine Using Cmdlet New-SPWOPIBinding

I am a young SharePoint OnLine user. I want Excel documents from all my sites to open directly with Excel and not Excel-OnLine. As I have a lot of sites and it would be long to make the sites one by ...
1
vote
1answer
64 views

Set choice column value for a new page using Sharepoint PnP

I am creating pages though Sharepoint PnP PowerShell and have been able to set the Title for the page. Add-PnPClientSidePage -Name "Sample Page" Set-PnPClientSidePage -Identity "Sample Page" -Title "...
0
votes
0answers
17 views

SharePoint Content Editor not displaying PnPJS Code

I want to be able to display my PnPJS code and make it show up within the Content Editor, but I am having trouble pulling the data in and displaying it. Here is what I have so far: 1.) I made a ...
1
vote
1answer
42 views

Using PnP PowerShell to find shares in Site / Document Library?

I am trying to find the list of shares in a site / document library / list using PnPPowerShell. Does such a Commandlet exist ?
3
votes
1answer
42 views

Set Userfield to allow Multiple using pnp in SharePoint Framework

I've Created a Field on my list PollAnswers and everything works fine with that part: pnp.sp.web.lists.getByTitle("PollAnswers").fields. addUser("Users", FieldUserSelectionMode.PeopleOnly).then(() =&...
1
vote
0answers
68 views

Read webpart Data - Sharepoint Online powershell

I have a requirement where I need to find if there is a table in the pages on my website. I thought of writing a PowerShell script for getting all the webparts in the page and reading the content ...
1
vote
2answers
34 views

Content Type is provisioning in SharePoint Online

I am aware that custom content type will not be available immediately in any existing site when we create a new one. In my experience, I have seen that it takes somewhere around 6-8 hours to appear in ...
0
votes
1answer
50 views

Get-SPOSite does not work with ErrorAction

I am working with SharePoint PnP PowerShell and using below command. This command works but when the site does not exist it gives me an error on the screen even if I specified -ErrorAction:...
0
votes
1answer
185 views

Connect-PnPOnline forbidden 403 powershell

I am using the PnP modules to connect to a sharepoint site and retrieve its subsites and the lists within them. However when i try to use the below command it throws (403) forbidden error. #Variables ...
3
votes
2answers
33 views

Hiding system fields in the document library

I am using SharePoint 2016 and want to hide created, created by, modified and modified by fields. This is in the document library view and not the new, edit or display forms (i.e. if you click on a ...
0
votes
2answers
64 views

PNP Provisioning: read external content into template

Can I have the different sections of a PNP provisioning XML template in separate files and combine them when applying the template? Like having all lists in a lists.xml, refer to this list in the ...
2
votes
2answers
161 views

How to avoid credential popup, to connect with graph API in the powershell script?

I have written graph API to fetch user detail from the Sharepoint Online Connect-PnPOnline -Url $SPSiteURL -Credentials $PnPSPOCreds -Scopes "Group.Read.All", "User.Read.All" $apiUrl = "https://graph....
1
vote
0answers
75 views

Not able to Load Managed Metadata Context

I am trying to create Term with PowerShell in SharePoint Online to do so I have written below code but on [Microsoft.SharePoint.Client.Taxonomy.TaxonomySession]::GetTaxonomySession($spContext) ...
1
vote
1answer
122 views

Create child term under existing term

I am using below PnP PowerShell command to create new Term. New-PnPTerm In my case, I would like to create new term with custom properties under the existing term. I can't find a way to do this. Is ...
1
vote
1answer
31 views

Set View's internal name/url

I am using SharePoint PnP Powershell to create a view. In order to do this, I am using New-PnPView command and everything works. What I would like to do is set view's internal name. for e.g. List ...
1
vote
0answers
26 views

Update metadata of many items in library

I have the requirement, that the values for two of my site columns of all our document libraries depend on a value outside of SharePoint (its stored in a database). If the value in the database ...
1
vote
0answers
238 views

The Push Notifications feature is not activated on the site

All of a sudden I started to seeing below error with PnPPowershell. Get-PnPContentType : The Push Notifications feature is not activated on the site When I googled I got below article which ...
0
votes
1answer
33 views

Content type is not available for SharePoint Online

Here is what I did in order to create content type, Connect to content type hub(https://.sharepoint.com/sites/contentTypeHub/) via Connect-PnPOnline Create Content Type with command Add-...
1
vote
1answer
22 views

“Converting” project from old to new technology?

I am working on a SharePoint project which started a couple of years ago. It started with SP 2013 on - prem, and we are now on SP 2016 with feature pack 2. In the project we used the Powershell based ...
2
votes
1answer
38 views

Add-PnPOffice365GroupToSite blows up on alias parameter

Using the script posted here: https://docs.microsoft.com/en-us/sharepoint/dev/transform/modernize-connect-to-office365-group I am trying to add an Office 365 group to a standard Team site ...
0
votes
0answers
19 views

Trying to use PowerShell to Groupify a team site, parameter error [duplicate]

I'm running a script from the PnP page here: https://docs.microsoft.com/en-us/sharepoint/dev/transform/modernize-connect-to-office365-group CSV file validates ok Running the second script to add the ...
1
vote
0answers
47 views

Find all InfoPath Forms in SharePoint Online and when last used?

I am new to this site and have a few questions that I will post. I have used this site quite a bit in the past for answers, but just recently joined and want to thank everyone for their contributions. ...
1
vote
2answers
48 views

Not able to remove SharePointPnP module

I installed "SharePointPnPPowerShell2016" module sometime back when I was doing some research around PnP PowerShell. Today I was trying to install "SharePointPnPPowerShellOnline" and got an error ...
0
votes
1answer
48 views

Getting Information on Users who deleted items using get-pnprecyclebinitem cmdlet

On our SPO Tenant we had had some Users who have accidentally deleted over 20k documents. This has been occurring over the past few months which has meant that the team in question didn't want to ...
1
vote
1answer
160 views

how to get user data from SharePoint online using powershell

I want to be able to find out what an user has access to throughout the site in SharePoint online. There are few articles on line on doing that on onprem but not for SharePoint online site. Has anyone ...
0
votes
0answers
29 views

Get an inventory of all InfoPath forms

So I'm looking to generate a list of all Lists AND Form libraries that use InfoPath forms in SharePoint Online. I see lots of scripts for one or the other but not both. Anyone?
0
votes
1answer
180 views

Use XML Web part in PnP provisioning template

I exported an xml viewer web part with Get-PnPWebPartXml and expected that I could copy-paste this to a pnp provisioning template. Looks like that the schema is different and instead of this (example ...