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

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.

0
votes
0answers
4 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
20 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
10 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
18 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
28 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
22 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
33 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
18 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
10 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
23 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
33 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?
1
vote
1answer
24 views

Get the value of the first column of the last row from a sharepoint list with PnPPowershell

My SharePoint list contains 4 columns and the first is a date column. The data in the list is sorted ascending. What I would like is to get the value of the first column af the last row of the list. I ...
2
votes
3answers
120 views

How to determine what columns the sharepoint visitors group has

I have this line: get-pnpgroupmembers -identify "visitors group" | select title, email The code above gives me all members of the visitors group. I found the column Title and email, how can I find ...
1
vote
1answer
36 views

How to get a list of all the members in the Visitors-Sharepoint group using PnPPowershell

Does anyone know the PnPPowershell-code for gettings all the members of a certain SharePoint-group (in my case the Visitor-group). Greetings, P
1
vote
1answer
30 views

PnP (PowerShell)

new to SharePoint (on premise-2013), I've been learning PnP for a few weeks. I would like to make a tree view of any library and I'm searching for a fast way to display the file/folder hierarchy. I ...
-1
votes
1answer
30 views

Error: The remote server returned an error: (403) Forbidden

I use this code to connect to the SharePoint online environment: $username = "xxxxxxxx" $password = "xxxxxxxx" $credential = New-Object System.Management.Automation.PSCredentials ($username, $...
0
votes
1answer
17 views

How to Import CSV file containg global taxonomy into SharePoint Online Global term Store using powershell

I have csv file containing all the Global term set values of SharePoint 2013 taxonomy. I want to import that in SharePoint Online using powershell script. Please suggest if any powershell script is ...
1
vote
2answers
27 views

Export/Import Glabal term store

We are migrating Global term store from SharePoint 2013 to SharePoint Online. Can i get the scripts to export term store from SharePoint 2013 in a text file and then import that in SharePoint Online? ...
-1
votes
0answers
74 views

Convert all our discussion board items into modern pages

we have sharepoint on-premises 2013 site which we want to migrate inside sharepoint online. and i am using one of the best tools which is Share-gate to do the migration. but as part of the migration (...
0
votes
2answers
45 views

Get-PnPList not working correctly with subsite's subsite

I am using below code to get lists of all subsites. But it is failing after one level of sitecollections. i cant connect with each web using Connect-PnPOnline as it takes too much time. Please suggest ...
0
votes
1answer
45 views

replace a SharePoint relative URL using powershell

I want to replace /sites/contoso RelativeURL with /teams/Int_Contoso using PowerShell. Is there any regular expression to achieve this as we have changed the destination URLs during migration and now ...
1
vote
1answer
56 views

Get-PnPProvisioningTemplate Home.aspx error

So I have an issue while using the Get-PnPProvisioningTemplate comandlet... So I can go through and create lists and doclibs and pages all over a site, and create the provisioning template and that ...
0
votes
1answer
49 views

Not able to create modern team site with group through PowerShell

I am trying to create office 365 group through PowerShell. I am using New-Unified group function to achieve. Group is creating successfully but unfortunately site is not creating behind the scenes. Is ...
0
votes
2answers
20 views

powershell to disable community template for the sub site in sharepoint 2013?

I have requirement in which, if a user creates a sub-site in a sitecollection then community template feature should not be available to him or he should not be able to see it.
1
vote
0answers
20 views

catch statement does not work SharePoint Online PNP

I have written a powershell script which downloads files from sharepoint using PNP. This works fine however I am trying to do some error catching when the file does not exist add it to a csv however ...
1
vote
1answer
51 views

PNP PowerShell - Get-PnPFile Question

I'm trying to copy files from SharePoint libraries and their metadata over to my local drive or to another hard drive eventually. I've finally managed to get the PowerShell PnP module to connect to ...
2
votes
1answer
197 views

Enable communication site at the root of a tenant

Iam trying to enable Communication Site on the root site level, but without any luck... Step 1 was to follow jimyHang blog, but this approach is not supported anymore, it is not posible anymore... ...
1
vote
1answer
30 views

How to connect with pnp-powershell to online sharepoint with only a userid?

I would like to connect with my PnP-PowerShell-script to online SharePoint that only ask for an email address to logon. How can I do that? Is that Possible? Greetings, P
0
votes
1answer
24 views

Logon to my company's online sharepoint with only a userid and not a password

I want to use Pnp-PowerShell to access my company's Online SharePoint. But with the logon to my company's Online Sharepoint it only asks for a userid and not a password. How can i write this in ...
2
votes
1answer
35 views

How to create a Microsoft Team's General folder programmatically?

When I Team enable an existing Office 365 group via the New-Team cmdlet, the General folder in Shared Documents is not created automatically. I have to open Microsoft Teams and navigate to "Files" ...
1
vote
1answer
40 views

Alternative PnP commands to SharePoint Online Commands

Are there any alternative PnP commands to SharePoint Online Commands such as: Connect-SPOService Disconnect-SPOService Set-SPOUser Set-SPOSite Get-SPOSite Add-SPOSiteCollectionAppCatalog Thank you ...
0
votes
1answer
94 views

How to export a SharePoint List to Excel using PnP Powershell

How can I export a SharePoint List to Excel using PnP Powershell. I have spend hours googling it. But no luck. I found this code below but i think it isn't PnP Powershell code. Export-SPWeb -...
1
vote
0answers
22 views

Display only the date and not the time in Pnp-PowerShel

I have this PnP-Powershell line that gives the last date in het column Date of a SharePoint list. Even thou in the list column are only dates displayed. With this command i get also the time. How can ...
1
vote
1answer
45 views

How to get the last line of a Sharepoint List with Powershell PnP?

I have created a SharePoint-environment and I use powershell to maintain my SharePoint. I use the Powershell module "Patterns and Practices PowerShell for SharePoint Online". I try to create a code to ...
1
vote
3answers
230 views

How to get Field values of a list item using CSOM Powershell?

How to get Field values of a list item using CSOM Powershell? I am using below code: foreach($field in $List.Fields) { write-host $field } I am getting the values as output: Microsoft....
1
vote
2answers
50 views

What is an alternative for New-Object Microsoft.SharePoint.SPFieldUserValue() in CSOM Powershell

I want to get the display name of created by and modified by fields for a user in a SharePoint 2013 List using CSOM in powershell. I know that can be acheived by: New-Object Microsoft.SharePoint....
1
vote
0answers
27 views

Apply-PnPProvisioningTemplate issue

I am getting below error message when I tried to apply a xml template to SharePoint Online site: powershell_ise.exe Error: 0 : 2018-11-29 08:11:45.1338 [Fields] [11] [Error] Adding field {...
1
vote
1answer
19 views

Prevent SharePoint from adding “Type” column to default view

We have automated deployment of webs and lists with PowerShell (PnP). We noticed that some of our views have got the "Type" (DocIcon) column visible but we did not script it to include that column in ...
1
vote
0answers
24 views

PnP commands to disable the “Documents” feature from users' Delves pages

when users access their Delve accounts inside office 365 there is an option to disable the "Documents" features, as follow:- Changing this option will disable the "Documents" feature for the login ...
1
vote
0answers
17 views

How can I force a PowerShell runbook return English error messages

I have a localized tenant and troubleshooting a SharePoint provisioning runbook. My problem is that it returns mixed (localized and English) error messages. Like New-PnPWeb gives English errors, but ...
1
vote
2answers
42 views

Setting default associated group via PowerShell not working

In SPO we have a couple of sites that lack a default group for the "Allow members to share this site and individual files and folders". I'm trying to set a SharePoint security group named "OOTB ...
2
votes
0answers
31 views

Provision site with pnp package gives file not found error

I would like to move the provisioning templates to SharePoint Online so I need to convert them to pnp package. I try to convert a folder with provisioning files using the Convert-...
0
votes
1answer
21 views

PnP — Add a claim value to a SP Group using PnP powershell

I was hoping to find an example where I could add a particular custom claim value to a SP group using PnP Powershell. Basically do what is done below using PnP powershell $ClaimValue = $_.ClaimValue ...
1
vote
1answer
58 views

How to disable/ hide delete button for column in list in SharePoint Online?

I have a calculated field in my custom list. I want to disable or hide delete button on this field edit page. I want specific users not able delete this column in a list but still be able to edit/ ...
0
votes
0answers
36 views

Upload file to Sharepoint Online using the url only

I would like to update all files on a site. I can collect the files I want: $files = Find-PnPFile "TEST.XML" -Web $web foreach ($file in $files) { #here I make changes ... #and would like to ...
1
vote
1answer
25 views

Can i run “DemoteNewsArticle” & “CommentsEnabled” commands without altering the ModifiedBy and Modified fields and without sending users alerts

I am working on a SharePoint online classic team site. and from time to time I run these remote power-shell commands:- 1- To un-post a modern page from being shown as News:- $clientSidePage = Get-...
0
votes
3answers
113 views

Hide Default Title Column via Powershell sharepoint pnp Module

I was wondering if anyone knew how to Hide the Default Title Column when you create a new List using the Powershell Sharepoint PNP Module. I've been trying the following $field = get-pnpfield -...
0
votes
1answer
39 views

Unable to create a site column named Department using PnP/power-shell script. Error “A duplicate field name ”Department“ was found.”

I am working on a sharepoint online enterprise wiki site collection. and i want to create a new site column named "Department" of type choice. now i already know that there is a built-in column which ...
2
votes
0answers
47 views

Best practice provision form library with custom template

I exported a site collection template that I wanted to apply a brand new site collection. The problems start with the form libraries: <pnp:ListInstance Title="Form-Index" Description="Form-...
0
votes
2answers
74 views

SharePoint Online: Cannot read user profile property via CSOM / PnP - why?

We created a custom user profile property. We want to read it's value via CSOM (or PnP, doesn't matter). We fail. Our property is not returned in the list of user profile properties. Other ...