Questions tagged [powershell]

Windows PowerShell is Microsoft's task automation framework, consisting of a command-line shell and associated scripting language built on top of, and integrated with the .NET Framework. PowerShell provides full access to COM and WMI, enabling administrators to perform administrative tasks on both local and remote Windows systems.[except from WikiPedia]

Filter by
Sorted by
Tagged with
0 votes
1 answer
15 views

SharePoint Online List Form PowerApp zip file difference between PS5 and PS7

We have several SharePoint Online List form Power Apps. We export and import them to different site collections in our tenant [DEV/TEST/ACCEPTANCE/PROD]. This requires to change the datasources.json ...
Danny's user avatar
  • 453
0 votes
0 answers
26 views

Apply Site Policy to Multiple Site Collections with PnP Powershell

Over time, a lot of SPO site collections have accumulated in my tenant. Therefore, I want to use Site Collection Feature called Site Policy to automatically close and delete sites after a defined ...
VeleMilosavljevic's user avatar
0 votes
0 answers
36 views

Add-PnPPageWebPart: Object reference not set to an instance of an object

I'm trying to add Quick Links to my SharePoint site using the PnP Module. However, when trying to run the command: Add-PnPPageWebPart -Page $page -DefaultWebPartType "QuickLinks" -Section 2 -...
Semper's user avatar
  • 1
0 votes
1 answer
31 views

Get-PnPAzureACSPrincipal - is this cmdlet deprecated?

Is Get-PnPAzureACSPrincipal cmdlet deprecated? I was able to use this cmdlet successfully 3 months before, but now ,running this cmdlet displays error that's this is not available. when I run Get-...
George's user avatar
  • 1,512
0 votes
1 answer
24 views

Listing groups with the users in them using PowerShell - SharePoint Online

Is it possible to list all groups on the SPO website along with the users who belong to a given group and export the results to Excel? I would like to add that 2FA is enabled on the website. Unless ...
Maro's user avatar
  • 1
0 votes
1 answer
24 views

How can I quickly Delete the contents of a SharePoint List View

I've got a SharePoint with a view called Retention that has around half a million entries, I want to delete the entries in the view from SharePoint as they are no longer required but I've not been ...
Daniel C's user avatar
0 votes
0 answers
10 views

Export 2013 User Profiles from UPSA -Multi Value - Managed MetaData

I am using the following script from GitHub to export user profile properties from SharePoint 2013 into a .csv file. Unfortunately, I'm only getting the first value for properties where multiple ...
Curious's user avatar
0 votes
1 answer
49 views

Find all users that have any level of permissions for a specific Sharepoint Site

I am having trouble with what I thought would be a very simple task, and I was hoping to ask for any assistance. I have a task to very simply collect a list of all users that have any level of access ...
BrandonW's user avatar
0 votes
0 answers
14 views

How to get a Video Thumbnail using PowerShell on SharePoint SE version?

I have a SharePoint (Subscription Edition) document library that is hosting some videos I uploaded. How can I get the video thumbnails using PowerShell? Again, the SharePoint version I am targeting is ...
Jean Paul Larach's user avatar
0 votes
0 answers
37 views

Intermittent Unauthorized Additional claims required errors when calling /user/chats endpoint

I am experiencing intermittent errors when querying the graph api endpoint for teams chat. I am using powershell and delegated access. Here is a code snippet: $tenantId = "my_tenant_id" $...
Andrew Gaskell's user avatar
0 votes
1 answer
73 views

How I can change Sender email in "Send an email (V2)" action for more than 80 Power Automate Flows?

I know I can do this by editing flow and finding "Send an email (V2)" action and changing email id from "From (Send as)" property, but to edit more than 80 flows and find "...
Dinesh Gawde's user avatar
0 votes
1 answer
74 views

SharePoint Online’s Block Download File Policy - Does it involve some user licensing?

I have a requirement where they don't want users to download files. There are 2 options I have been reading about. Using Conditional Access Policy Using a PowerShell command. My question is there ...
naijacoder's user avatar
  • 4,232
0 votes
1 answer
21 views

Get script output to CSV

Please help me to export the output of the script as a CSV. $siteUrl = "https://webapplication" $daysThreshold = 30 # Number of days to consider as "active" # Load SharePoint ...
Karnati Reddy's user avatar
0 votes
1 answer
82 views

Can we hide the Sync on all the current sites and future sites using UI or using PowerShell

I know that we can hide the Sync button for a document library or for all the document libraries inside a site as mentioned in this link https://www.sharepointdiary.com/2017/08/disable-sync-button-in-...
microsoftdeveloperdesigner's user avatar
0 votes
1 answer
246 views

List folder structure in SharePoint Site COllection

I have a SharePoint online site collection with 17 subsites and a lot of document libraries, folders and sub folders in each subsite. Is there a powershell script that will list all the subsites, ...
Heste's user avatar
  • 318
0 votes
0 answers
35 views

Exception calling "Update" with "0" argument(s): "To add an item to a document library, use SPFileCollection.Add()

I have an PopCorn Ketentuan Library, where i need to populate it with some old data we have on csv file. so i did the following:- Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction ...
Ramadhan Putra Setiadharma's user avatar
0 votes
2 answers
56 views

SharePoint Online - unused content report

I would like to review the usage of my SPO site and extract a report with the following details: Title, Created Date, Last Modified Date, Number of hits last 6 months, Last modified by, Created by I ...
Lukas's user avatar
  • 45
0 votes
0 answers
14 views

Project 2019 on-prem security mapping with PowerShell

I am building a script for automated deployment of SharePoint Farm with Project 2019 service application and a Project Web Application. I used to manage Sharepoint online site collections several ...
Grigory Sergeev's user avatar
0 votes
0 answers
23 views

Adding User to Site group fails for form based authentication using Powershell

When attempting to add a user using PowerShell to a SP2016, which has Form Base Authentication active, New-SPUser fails with user not found. The following works for Domain users. $web = Get-SpWeb $...
Fredrick Campbell's user avatar
0 votes
1 answer
18 views

Removing database snapshop from failed backup

When trying to create a backup using a command like this: Backup-SPSite https://server_name/sites/site_name -Path C:\Backup\site_name.bak -UseSqlSnapshot Source I ran into an issue where the target ...
Danyx's user avatar
  • 151
0 votes
0 answers
32 views

Powershell to read excel and update metadata in different document library based on a cell value by matching the unique file name

I have multiple libraries storing only document with unique name, site wise. I need to update metadata for these uploaded documents based by reading an excel sheet. The twist is that it updates ...
cjs's user avatar
  • 1,204
0 votes
1 answer
140 views

Why Get-AdminFlow failed to return all the flows

I have Power Platform administrator permission and recently I used Get-AdminFlow cmdlet to list all the flows under our tenants. The cmdlet is working and listed a lot of flows. However I found about ...
Mark L's user avatar
  • 4,065
0 votes
1 answer
253 views

How i can get all files recursively without folders using Get-PnPFolderItem from the root folder and its subfolders

I want to get all the files from the root folder and its sub-folders, now when I tried this script: $customerFolderFiles = Get-PnPFolderItem -FolderSiteRelativeUrl $serverRelativeUrl -Recursive -...
microsoftdeveloperdesigner's user avatar
0 votes
0 answers
28 views

Method 'SetValueForUICulture' don't set other language value

I have a problem with SetValueForUICulture method in my PowerShell script, I added field using method Add-PnPField and later according to what I found on the internet I tried use SetValueForUICulture ...
kajaak's user avatar
  • 1
0 votes
1 answer
18 views

Can you move unlicensed accounts around using PowerShell in SharePoint Online?

I'm trying to bulk move users from one group to another in a SharePoint online group. I ran this script: And it moved only users that have O365 licenses. When it tried to move the other users, I got ...
Ryan's user avatar
  • 3
0 votes
2 answers
74 views

Build an instant flow which iterate over a SharePoint library that have 2 million documents and folders

We have a SharePoint document library which contain around 3,000 customers subfolders inside the root folder, and total of 2 million files and sub-folders inside the 3,000 customer sub-folders. Now we ...
microsoftdeveloperdesigner's user avatar
0 votes
1 answer
152 views

Create lookup column with multi select option using Powershell

I want to create lookup column with multi select option using PNP PowerShell in SPO. I am able to create lookup field below script. But i dont know what is the property to be added to make it multi ...
Sriram Tamilarasan's user avatar
0 votes
1 answer
38 views

How to get the values of all the Properties in an SP Feature

I'm trying to see all the values in a particular SP Feature. I've been trying to do so with Powershell as follows. Get-SPFeature MessageServer | Select -Property Properties Though all that seems to ...
Dan G's user avatar
  • 103
0 votes
1 answer
48 views

Migrate documents from google drive to OneDrive and update the links inside the documents, this is possible

We have many documents that are inside google drive, the documents contain links to other documents inside google drive and links to sections within the same documents. so is there a way to migrate ...
microsoftdeveloperdesigner's user avatar
0 votes
0 answers
44 views

Getting Empty response when connecting SharePoint 2016 Excel Web Service method via SOAP client

We are having SharePoint 2016 farm and we try to connect the site and Excel Service via SOAP client. When we use OpenWorkbook for getting session ID, its working fine and the session ID is coming. ...
Babu M's user avatar
  • 1
0 votes
0 answers
17 views

Bulk file move same file extension

I need to move files with from user. Sharepoint.com to user.onedrive.com. I tried using the SharePoint Migration Tool but it’s giving an error. Can someone help me with the easiest way to code this?
Lisa Jefferson's user avatar
0 votes
1 answer
102 views

How to apply OneColumnFullWidth section in SharePoint site template

I have created a site template using PnP framework: <pnp:Section Order="3" Type="OneColumnFullWidth"> <pnp:Controls> <pnp:CanvasControl ...
Alias Varghese's user avatar
0 votes
1 answer
130 views

Cant register HUB again after changing Site URL

Goal was to rename URL for SharePoint Online HUB Site. I tested on DEV tenant to unregister HUB Site, Change the URL and Register again. it was working, all sites get connected again back to the Site ...
Popkornak's user avatar
  • 113
1 vote
1 answer
207 views

SPO PowerShell to get App Display name and App Identifier from "Site App Permissions" Page

In SPO, how to get the App Display Name and App Identifier details which are displayed in _layouts/15/appprincipals.aspx?Scope=Web page using PowerShell? Get-PnPApp command displays the app details ...
George's user avatar
  • 1,512
0 votes
0 answers
83 views

How to update SPFx web part property pane values using PowerShell scripts?

How to update SPFx web part configuration property pane values in SharePoint 2019 on premises site using PowerShell?
Kaniksha Lakshmi Priya's user avatar
0 votes
1 answer
117 views

Downloading SharePoint 2019 monthly patches using a PowerShell

I would like to download SharePoint 2019 patches (on-premise) using PowerShell Script. The Microsoft Update Catalog only has core patches but I want to download language patch as well. Please let me ...
san k's user avatar
  • 1
0 votes
0 answers
31 views

Is it possible to change the "Indexing Site Content" Setting in Sharepoint Online via powershell?

I've spent hours looking at solutions to this high priority issue, using PNPOnline, Sharepoint Online Management Shell, and CSOM, and whenever I try anything using nocrawl, it tells me the property ...
IDontKnowHowToCode's user avatar
1 vote
1 answer
534 views

Using single Connect-PnPOnline connection for different SharePoint sites

I need to get a list of all files, older then 5 years, from few thousands sharepoint online sites and I am trying to do it with powershell script. The problem I am having is that I have to reconnect ...
user3195616's user avatar
0 votes
2 answers
2k views

Connect-SPOService: Could not load type 'Microsoft.SharePoint.Client.SharePointOnlineCredentials' from assembly 'Microsoft.SharePoint.Client.Runtime,

I am trying to run this command inside Windows PowerShell 7 : Connect-SPOService -Url https://***-admin.sharepoint.com But I got this error: Connect-SPOService: Could not load type 'Microsoft....
microsoftdeveloperdesigner's user avatar
0 votes
1 answer
121 views

Create a SharePoint Modern Team Site with PNP PowerShell

I tried to create a new Modern SharePoint Site with the PNP Framework. I ran in the following error. I want to store the Url in a variable. Everytime I store it in a variabel I get an error message: ...
Matthias's user avatar
1 vote
2 answers
314 views

How to extract department from page properties using Powershell's PnP and set it?

I have the following page: test.aspx But when I run Get-PnPClientSidePage, I do not see it as a value, even if I expand any of the items listed. Additionally, I don't see a description either. Once ...
Me Myself's user avatar
0 votes
2 answers
95 views

Delete a managed metadata site column from a library only

In SPO, i am trying to delete a Managed Metadata Site Column from a library. I'm using the below script to delete: $SiteURL = "https://Abc.sharepoint.com/sites/SiteName" $ListName = "...
George's user avatar
  • 1,512
0 votes
1 answer
191 views

Set default page template on Communication site with PowerShell

Is there a way to tick the "Set default selection" property of a page template, so that it will be use as the default page template? I'm trying to find a way of doing this programmatically, ...
Robert Lindgren's user avatar
1 vote
1 answer
252 views

Activate Modern Audience targeting on Site pages with PowerShell

I'm trying to find a way to enable modern audience targeting on the Site Pages library of a Communication site with PowerShell. Activating the hidden feature does not have any effect. Is this possible?...
Robert Lindgren's user avatar
0 votes
2 answers
203 views

Get group members of a site if the group name is unknown

I'm trying to get all members of SharePoint 'Owners' and 'Members' groups across sites in my tenant. When I loop through the list of sites and use the following command for each site: Get-SPOUser -...
Mubashir's user avatar
0 votes
1 answer
164 views

How to backup the SharePoint pages in the Site pages library with PnP Powershell

How can I backup my SharePoint pages resided in the Site pages library of my Communication site using PnP PowerShell?
user1903995's user avatar
1 vote
1 answer
867 views

Automate clearing SharePoint Recycle Bin and Second Stage Recycle Bin

Does anyone know of a way to automate clearing recycle bin and second stage recycle bin for SharePoint? I use my SharePoint strictly for scheduled backups of my OS and the items in the recycle bins ...
CntrlAltDel's user avatar
0 votes
1 answer
50 views

How to add multiple read-only columns to Sharepoint List

I am creating a Sharepoint List in Sharepoint Online. I am uploading from an excel file and I want all the columns to be read-only except for something like 'Status' or 'Notes.' When I upload from ...
amchugh89's user avatar
  • 101
0 votes
0 answers
94 views

Provisioning a Teams Template with a specific folder structure with the PNP provisioning engine in PowerShell

I try to create a template for Teams with a specific folder structure, e.g. General -Folder 1 -Folder11 -Folder12 -Folder 2 I managed to create a Team with PNP so far, but I'm struggeling to connect ...
Matthias's user avatar
0 votes
1 answer
174 views

How to access a List View's custom formatter?

While doing some custom formatting for a List View, invalid JSON was checked-in and now, the List View will not render and I can't find a way to access the custom formatter without rendering the list ...
ChiefTwoPencils's user avatar

1
2 3 4 5
83