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
11 views

Error: : Exception calling “ExecuteQuery” with “0” argument(s): “The operation has timed out”

I am trying to copy the Files and Folders with meta data from one library to another library,in SharePoint Online using powershell CSOM, i am getting this error "Exception calling "ExecuteQuery" with ...
0
votes
0answers
12 views

Passing parameters from Powershell JSON to triggered Flow

Background: I have some PowerShell code used to create team sites based upon a list column trigger. This works well. I'm also implementing a Site Script/Design that includes a Flow trigger. I've ...
0
votes
1answer
21 views

How to provision site assets with PnPProvisioningTemplate

I am trying to include company-wide images in my provisioning of Team sites in Sharepoint Online. I would use an organization asset library, but my Sharepoint topography is based on Hub sites with no ...
0
votes
0answers
12 views

Set-PnPTraceLog with Azure PowerShell Function

Thre are lots of post regarding how to use PnP with Azure PowerShell Function below are few links https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-pnp-...
0
votes
1answer
15 views

Is it possible to automate adding SharePoint sites to policies in Security & Compliance Center using PowerShell?

Good afternoon, I hope to get some advice on how to tackle the following task: I’ve automated the provisioning of SharePoint websites and the user can request a website using a PowerApps form. On ...
0
votes
2answers
47 views

How to set timezone when creating sites using New-PnPSite

I'm currently using this command to create new SharePoint modern communication sites: New-PnPSite -Type CommunicationSite -Owner me@acme.com -SiteDesign Blank -Lcid 1044 -Title "My site" -Url https://...
1
vote
2answers
36 views

Apply-PnPProvisioningTemplate : The specified user c:0t.c|tenant|5*****c could not be found

I want to copy a site collection from one tenant to another. insdie the source i run this command:- Get-PnPProvisioningTemplate -Out c:\template20.pnp -IncludeSiteCollectionTermGroup inside the ...
1
vote
1answer
47 views

Get-PnPProvisioningTemplate with -IncludeSiteCollectionTermGroup, how will it work if i Apply the template to the same tenanat and to a new tenant

I am reading about the Get-PnPProvisioningTemplate -Out template.pnp -IncludeSiteCollectionTermGroup from this link https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/get-...
0
votes
1answer
16 views

Get-PnPProvisioningTemplate return this error Get-PnPProvisioningTemplate : Maximum retry attempts 10, has be attempted

I have a communication site collection inside our SharePoint online tenant. and i want to export this site and create a new site based on the exported template, so i run this command:- Connect-...
1
vote
1answer
33 views

Is it safe to “Get-PnPProvisioningTemplate -Out template.pnp”

I have a communication site collection inside our SharePoint online tenant. and i want to export this site and create a new site based on the exported template, so i am planning to run this command:- ...
1
vote
1answer
38 views

Which permissions do Azure AD Apps need to get SPO admin rights?

I want to automate SharePoint admin tasks with Azure Automation. I don't want to use user/password but Service Principle. (We have MFA enforced.) I set up a new "Azure Automation" account, including ...
3
votes
2answers
126 views

Download specific files from a folder in Sharepoint by using Powershell

I am currently trying to automatize downloading certain files in a Sharepoint-online folder by scripting in PowerShell. At this point the script (look below) only downloads one specific file, while I ...
1
vote
2answers
33 views

Export to CSV | DefaultLinkType value of all the sites in Tenant

Is there any SharePoint Online PowerShell script available to export the value of "DefaultLinkType" of all the sites in Tenant to a CSV? I am not able to find one.
0
votes
1answer
25 views

PnP to update new SharePoint Subsite

We are using the following script due to the SharePoint REST API not controlling these properties. When I run this below script as a whole, I get: Exception calling "ExecuteQuery" with "0" argument(s)...
2
votes
1answer
86 views

Use App Password to Authenticate with PowerShell PnP

Suppose you have a tenant with MFA enabled. The same tenant allows users to create private app passwords like on the screenshot below. Question: Is it possible to use this app password to ...
0
votes
1answer
36 views

How to set a default Modern footer and/or set footer links Programmatically

I have a client with currently hundreds of Modern Communication sites in SharePoint Online, and will potentially be creating thousands in the near future. They have a fairly simple Footer with only a ...
2
votes
1answer
32 views

Find List Creator using PnP

I would like to identify the creator of a list with PowerShell PnP. AFAIK, I need to read the Author property, but the best I've found is the GUID of the author. > $l = Get-PnPList -Identity <...
1
vote
1answer
53 views

Copy library to different site collection with pnp

I have got a SharePoint library with a lot of files, which need to migrated to another site. The library includes some additional columns for each file (e.g. customer the file is related to, ...
1
vote
1answer
14 views

What are the meaning of histogram results?

I'm reading about Measure-PnPResponseTime PnP PowerShell command and don't know what the Histogram property talks about. I would like someone could explain to me what is the meaning of the keys and ...
0
votes
1answer
19 views

How to clear items from Get-PnPTenantServicePrincipalPermissionRequests command?

I was learning how to use the service principal PowerShell PnP commands and everything was fine until I reached Get-PnPTenantServicePrincipalPermissionRequests. I understand how to grant and revoke ...
0
votes
1answer
28 views

Fix broken SharePoint online lookup site column

I'm trying to fix the broken SharePoint online lookup column (site) which is causes problems after migration. Any answers? Thank you!
1
vote
0answers
25 views

Why using PnPO365ManagementShell parameter with Connect-PnPOnline allows to be multitenant?

I cannot find enough information googling about this issue and I would like to understand why connecting to a SharePoint Online tenant with this parameter, PnPO365ManagementShell allows me to work in ...
0
votes
1answer
48 views

Unable to remove a Remote Event Receiver attached to a list using Remove-PnPEventReceiver .Erro “emove-PnPEventReceiver : Access denied.”

I have a remote event receiver which is attached to a list. so i want to remove it, but when i try this PnP script using the Office 365 admin:- Remove-PnPEventReceiver -List "Our Project" -Identity "...
0
votes
1answer
41 views

Get a specific file with PnP Powershell

I need to get a specific file in the SitePages of a SharePoint Online site collection. I know how to get all pages with PnP (see code below), but I need only one specific. Export & Import of all ...
0
votes
2answers
63 views

Getting “Access Denied” on “Invoke-PnpQuery”

I am trying to move a site in SharePoint Online but get an error while doing so. Code : *$NewSiteURL = "/sites/Helix/HelixArchive/TobeArchived"* *Connect-PnPOnline -Url $SiteURL -Credentials $...
0
votes
0answers
85 views

How can a SharePoint Online wiki page library be migrated to another SharePoint Online tenant?

We are trying to move a SharePoint Online wiki page library from one SharePoint Online tenant to another (Office 365). There is no functionality within Sharepoint to do this, and it is too expensive ...
0
votes
0answers
30 views

Unable to remove a Remote Event Receiver attached to a list using Remove-PnPEventReceiver

I have a remote event receiver which is attached to a list. so i want to remove it, but when i try this PnP script using the Office 365 admin:- Remove-PnPEventReceiver -List "Our Project" -Identity "...
0
votes
1answer
64 views

pnp schema template issue - how to inlcude “new and existing guests” option in the schema

I am not finding the right XML schema to include it in my PNP provisioning template. How can I include settings called "New and existing guests" for external sharing while provisioning a site using ...
0
votes
2answers
121 views

Add field in Default View of the List while creating using Add-PnPFieldFromXml command

I am creating a field in SharePoint list using Add-PnPFieldFromXml command The field is created successfully. I want to add this field to the default view of the list using the same command. I ...
1
vote
2answers
72 views

How to change a Private Site logo with PowerShell

I am trying to change the logo of a private site through PowerShell, but whenever I try the system changes it back to a new logo. I add the new logo to the 'Site Assets' library and then use the Set-...
0
votes
1answer
36 views

Programatically define document set default view

Im trying to be define a document set default view from powershell, code, csom, or site template, but I cant find any way to do so. My library have 5 views, and I have a document set XX added to the ...
0
votes
1answer
24 views

How to set up a single site app catalog?

Can anybody point me in the right direction on how to set up an App catalog for a single site in my tenant (SharePoint online)?
0
votes
1answer
20 views

get the recent file

I am logging into the sharepoint webiste and getting folder contents as follows: $connection = Connect-PnPOnline -Url $siteName -Credential $credential -ReturnConnection $wholeContent = Get-...
1
vote
1answer
61 views

Disable access request for all SharePoint online Sites

When users create SharePoint sites, By default access requests and Sharing are enabled. I would like to disable this feature globally on my SharePoint online Tenant.
0
votes
2answers
93 views

login to sharepoint site with the service account instead

I have got a service account (Windows AD Data Mgmt) from the company admin so that I can do the following using PowerShell: Login(Connent-PnPOnline) to a SharePoint site. Download a file and process ...
1
vote
2answers
41 views

Adding multiple or an array of values using Set-PnPPropertyBagValue

I would like to add an indexed property bag value to some of my SharePoint Sites that is called "former names". I would like to add multiple string values or an array of string values under the one ...
0
votes
1answer
72 views

PNP Apply-ProvisioningTemplate - SharePoint List's field is skipped if of different type

I am currently using Azure Build and Release Pipelines to automate deployment to a testing environment. A PowerShell script is used to re-apply a template.xml file for the sites lists and libraries ...
0
votes
1answer
80 views

Submit-PnPSearchQuery - Does this search inside documents?

We have several documents in our online SharePoint site. We need to write a Powershell script that will return a list of all documents with a specific word in it. Is this command supposed to return ...
0
votes
0answers
180 views

PnP SharePoint Powershell command throws exception

We are using PnP powershell which works as expected. However, sometimes we face an exception intermittently with the error as given below. The PnP powershell script line is Connect-PnPOnline -Url $...
0
votes
2answers
117 views

Can i update the enterprise wiki pages' content type and page layout using PnP, without affecting the pages' metadata

I have migrated an old enterprise wiki site collection 2013 to SharePoint online. I did not create the source site collection, and i found that the wiki pages are associated with the built-in ...
1
vote
2answers
87 views

Pnp powershell script find propertyBag on SPO Hub Site -Assocated

Is there a way to find the properties of the site/web using Get-PnPPropertyBag by looping through a Hub site and associated sites? Get-PnPPropertyBag -Key MyKey only for one site properties, but I ...
0
votes
0answers
26 views

Change the “site property” web part via PS

I have hundreds of pages in a site page library. All of them have the "site page" web part and currently shows things like keywords, published date etc. I want to add another field/property to this ...
1
vote
1answer
114 views

What is the definition of “Custom Action” in PnP?

I am an Admin for SP2010, SP2013 and SP2016 on-premise farm and I never use SP online before. Recently I am checking the ability of SharePoint PnP PowerShell and found it also support SP2016 on-...
1
vote
1answer
25 views

PNP set created by Value for a Document Library

When i am trying to do a bulk import of files using PNP i am unable to retain the created by Value (The files are in a local file share) .I am able to set all the other values (Created,Editor,Modified)...
1
vote
1answer
25 views

PnP Provisioning Tenant how to migrate one tenant to another location

Is there a possibility to migrate all resources from one tenant to another? How Could we Migrate them to deploy from the testing environment to the production environment?
0
votes
0answers
64 views

PnP Powershell - Updating the Search Settings

My site collection on SP2016 looks like: /sites/mySiteCollection /sites/mySiteCollection/TopLevelSite-A /sites/mySiteCollection/Subsite-A1 /sites/mySiteCollection/Subsite-A2 ...
0
votes
1answer
68 views

Azure Runbooks attempts 3 times but no error

Param ( [Parameter (Mandatory= $true)] [string] $siteUrl, [Parameter (Mandatory= $true)] [string] $DocLibName ) #Connect to SPO $tenantName= "client" $username = "admin@client.onmicrosoft.com" $...
1
vote
3answers
79 views

How to get a Sharepoint-group with its members displayed in PowerShell

How to get a SharePoint-group with its members displayed in PowerShell. I have tried this: Get-PnPGroupMembers -Identity "xxxxxxxxxxxxxxxxx" | select title But doesn't give me the results I would ...
1
vote
2answers
39 views

(PnP Powershell) Note type fields appear to be empty when versioning is enabled

I'm trying to build a script that will copy the contents of a list from a site to another list in a subsite or a different site. Unfortunately many multiline text fields (FieldType = Note) appear to ...
2
votes
1answer
108 views

Powershell script to update a column for a given list item/site page

I have a powershell script that uses a variable $pages (containing all my publishing sites in a library) in a foreach, converts them from classic pages to modern pages and export them to a external ...

1
2 3 4 5
8