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
0answers
8 views

Get the number of downloads/views in SP online document library

I want to get a report for a duration where I need below details for all the files in a document library. Any suggestions on OOB or PowerShell or any other way? Date & Time User details
0
votes
1answer
16 views

Move-SPUser to convert users only in 1 webapplication

In on-premise farm, I understand that using Move-SPUser will update the user identity in all the web applications in the farm. Is there a recommend approach wherein I can use Move-SPUser to update ...
0
votes
0answers
3 views

How can I get to a PWA site QuickLaunch through Powershell?

I want to add a QuickLaunch link to a PWA site using Powershell. I know I can get to the regular QuickLaunch through Powershell by $web = Get-SPWeb <site url> $ql = $web.Navigation.QuickLaunch ...
0
votes
0answers
11 views

"Root element is missing" when executing ClientContext.ExecuteQuery()

The following script works on all computers in my company, but doesn't work on one laptop when working from home. The laptop can run the script in the office, not from home. The laptop in the home ...
0
votes
1answer
47 views

Updating a Script Editor web part's snippet contents via PowerShell & CSOM is failing

I used code from this site, which updates the title of a web part, so the change needed is perhaps minor. The code that isn't working: Write-Output $webPartDefinition.WebPart.Properties.FieldValues....
0
votes
0answers
12 views

Conversation yammer feed webpart update dynamically topic id (SharePoint online Modern page)

I'm working on a SharePoint online environment and migrated classic sharepoint page to modern site using pnp powershell script. I have around 2000 site pages. I have yammer feed in classic page which ...
0
votes
0answers
12 views

Edit new item form with PnP in SharePoint 2019 on-prem

we run SharePoint 2019 on-prem. I'm using PnP PowerShell to bulk replace a few existing fields (columns) with new ones in a list. I also want to replace these fields in the respective new/edit/display ...
1
vote
1answer
19 views

Save SPO site as template and use script to create next sites from template

We are currently switching from SP 2016 on premise to SPO. In SP on premise we had a site template which was used for any new project site (power shell script running at site creation). As a result ...
0
votes
1answer
13 views

Change value of PesonOrGroup 'Show field' value with powershell

Using SharePoint 2013 enterprise on-premises. Last week a user recommended changing the 'show field' value from the default to 'Account' on our task lists. This is hundreds of changes as we have 220+ ...
0
votes
0answers
14 views

AutoSPInstaller install script failed with Warning "SharePoint version (year) was not specified"

Importing AutoSPInstaller PowerShell Module... SharePoint version (year) was not specified in "C:\TEMP\SP\Automation\AutoSPInstallerInput.xml" At C:\TEMP\SP\Automation\AutoSPInstallerMain....
0
votes
1answer
31 views

SharePoint Number Field - Remove Comma Separator

My document library in a SharePoint site has reached threshold limit and because of which I am not able to update number field to remove comma separator. Is there any way either through PowerShell or ...
0
votes
0answers
14 views

Move entire Library contents with PnP PowerShell

Our company is doing a migration from SharePoint sub-sites to new sites. The only things being moved are document libraries, since we'll be moving a lot of libraries I have looked into doing this with ...
0
votes
0answers
9 views

How to Generate a Password on Powershell Azure Function

How can I generate a pw on a Azure Function (via powershell 7.0)? Tried the following code: using namespace System.Web; [int]$MinimumPasswordLength = 8 [int]$MaximumPasswordLength = 10 [int]$...
0
votes
1answer
48 views

Can we remove the SharePoint word from the upper banner for all our sharepoint sites

We have a SharePoint online tenant, and we need to remove the word SharePoint from all the upper banners for all the sites, so first question is this possible per site, then is this possible for all ...
0
votes
0answers
15 views

PowerShell - Add-SPOSiteScript - addSPLookupFieldXml action not recognised

I would like to add some new tables to my SPO site through using PowerShell and a site script. One of the columns is a Lookup type. According to this, I should be able to use the action ...
0
votes
0answers
17 views

Publish Sensitivity Labels from PowerShell?

The New-LabelPolicy cmdlet can create a label policy for sensitivity labels, but the documentation doesn't mention publishing in relation to this cmdlet. After using New-LabelPolicy to create a policy,...
1
vote
1answer
24 views

I am unable to delete the SharePoint online subsite that is created under the team site

I am unable to delete the SharePoint online subsite that is created under the team site. Please tell me what is wrong?
0
votes
1answer
25 views

Site Sharing settings with PowerShell, PnP PowerShell or Graph API

I'm looking for a solution to access the following setting with PowerShell, PnP PowerShell or Graph API. I can't find any option to do that. I found the option to disable it, but not to restrict it. ...
0
votes
1answer
19 views

Limiting font colors while creating a post?

Is there a way to limit a font color while creating a post to black only? I'm also interested with other limitations like Normal font is 18px only and Headline is 28 etc. Is there way to do it for ...
0
votes
1answer
20 views

SharePoint Update Item Takes Long Time on Item.Update() (Approximately 5 minutes)

I have a List that takes long time on Item.Update(). Even Its added an Item to the list it waits few minutes to completed the Task. Here what I have tried to troubleshoot. Created Template and tried ...
1
vote
1answer
27 views

Issue with Connect-SPOService

I have to delete one of my SharePoint site but unfortunately I can only do it using PowerShell However when I try to use the Connect-SPOService command, I get this error message: “Connect-SPOService: ...
0
votes
1answer
39 views

How to autologin in Office-365 in PowerShell script hosted in Task Scheduler

I created PowerShell script that runs well in PowerShell-ISE. It autologin with credential popup and works as expected. Problem: While same script I added to Task Scheduler then it prompts credential ...
0
votes
0answers
15 views

Launching a PowerShell script from a SharePoint list item

Can a hyperlink be added to a SharePoint list that, when clicked, executes a PowerShell script? The objective is, users can see a list of current outages on a portal page. If a given user is being ...
0
votes
2answers
159 views

Unable to add Organization Asset library in SPO due Unauthorized operation

I'm trying to add organizational asset library but it fails as Unauthorized operation tried both SPO and PnP cmdlets. $AssetsLibraryURL ="https://tenant.sharepoint.com/sites/Site/Kuvapankki" ...
0
votes
0answers
21 views

The term 'New-CsOnlineSession' is not recognized as the name of a cmdlet

strong text Hello, i try to enable webinar in teams powershell but when i try to use the cmd AllowMeetingRegistration true i have this message errour knowing that I am already connected via the ...
0
votes
0answers
5 views

How do I get SchemaXmlWithResourceTokens property of a field in SharePoint Online?

I am trying to see the custom field's description in other languages. When I use Get-PnPField in powershell, it does not bring any value for SchemaXmlWithResourceTokens property. Am I doing something ...
1
vote
1answer
40 views

ADFS configuration for SharePoint 2016 new web application

I have successfully configured for one web application. While adding the second web application using PowerShell script I have given wrong urn and now when I try to update the urn in SharePoint it ...
0
votes
0answers
25 views

PowerShell script to change SharePoint Designer workflow status

I want to change the status of workflow using PowerShell script. If you go into workflow settings in a library in SharePoint, and click on Remove a workflow, you see the 3 settings I'm referring to: &...
0
votes
1answer
42 views

How to bulk cancel [Errored] workflow instances that either run via a Site Workflow or a List Workflow

What would the PowerShell command be to cancel all the Errored workflow instances that occured within a Site Workflow or a List Workflow` by ignoring any already [Cancelled] workflow instances. As ...
0
votes
1answer
21 views

How to see which quota template is applied to a SharePoint 2013 site collection through PowerShell

How do I use PowerShell to tell me which quota template is being applied to a specific site collection in SharePoint 2013?
0
votes
0answers
42 views

Adding Labels to Term Items in SharePoint online using PowerShell

I've been trying to import data from a CSV file using the PowerShell Script located here : SharePoint Tools GitHub When I run this it creates the terms okay but isn't adding the synonyms. As the ...
0
votes
1answer
234 views

`Get-SPOUser` is denied but `Set-SPOUser` works

Using the credentials for a SharePoint Administrator user (User-X), I can successfully run the Set-SPOUser commands but not the Get-SPOUser command. PS > Connect-SPOService -Url "https://...
0
votes
1answer
30 views

Is it possible to limit permissions when using PnP PowerShell or SharePoint Online Management Shell to a user's existing permissions?

I have Microsoft Teams team Owner permissions in Office 365 and all users in our organisation can create teams. Many of my tasks involve introducing efficiencies using tools such as Power Automate, ...
0
votes
1answer
44 views

How to export or backup column formatting JSON values?

Is there a way to export or backup the column formatting JSON that has been applied to SharePoint list columns? Obviously, column formatting is so useful that it is often applied to lots of lists, and ...
0
votes
0answers
22 views

Inventoring SharePoint Online Custom web parts

I want to list all the custom web parts from a SharePoint Online Site using PowerShell. So far I have the command Get-PnPApp so I could use PnP commands. Also the command $web.AppTiles lists the ...
0
votes
0answers
15 views

Upload template.pnp to SPO site collection and having it as template option when creating new site

I have the testtemplate.xml and testtemplate.pnp files ready for a new template that I would like to deploy in my site collection. How can I achieve this in a way that when I want to create a new site ...
0
votes
2answers
32 views

How to run PowerShell command from SharePoint Script Editor?

I want to run PowerShell command (any command) from SharePoint Script Editor. Please let me know how can I achieve it? I use the below script to lunch notepad, just to test it, and even it doesn't ...
0
votes
1answer
70 views

File Downloaded From SharePoint Online using PowerShell is not Formatted Correctly

When using Powershell to download a file from SharePoint Online, the file is not encoded or formatted properly. With the below code, I am able to successfully authenticate to the site and download a ...
0
votes
2answers
40 views

SH2016 patch config Wiz error

I am trying to implement the new Jun patch on SH2016 farm and when I try to run the config Wiz I get an error unable to upgrade [searchAdminDatabase] failed and the reason it’s looking for a user ...
0
votes
0answers
10 views

Info Remove Users from sites groups with powershell in sharepoint 2013

I'm sorry but I'm not a developer and I need a powershell script (about Sharepoint 2013) that deletes multiple users from groups and sites. I share the example CSV file which must be read by the ...
1
vote
1answer
26 views

How to delete SharePoint group using membershipgroupid in SP 2013

I am trying to move SharePoint Groups from one site collection to another. In target site, the SharePoint groups got created. But the SP groups are showing in groups.aspx & not in user.aspx. Also ...
1
vote
1answer
52 views

How to restore all Items from Recycle bin from a particular SharePoint online library using PnP PowerShell?

I have a SharePoint online library called MyLibrary, it contains approx. 4000 items. The items got deleted, and I need to restore them using PnP PowerShell, the following are the challenges I am ...
0
votes
0answers
20 views

PnP-PowerShell how to get data-attr value from PnPFile

I'm trying to get the value of a data-attr="value" from a list of SharePoint site pages. I'm new to PnP PowerShell and SharePoint so any help in understanding is greatly appreciated. This is ...
0
votes
1answer
34 views

Looking for the property name used to toggle to show user picture in SharePoint list field settings

For a given SharePoint list column of type User there's a column setting, a toggle that allows to show the user profile pictures instead of names only. I was looking to toggle this via PowerShell but ...
1
vote
0answers
30 views

Fix 'Accept-Language' header for a CSOM request in PowerShell script

I'm trying to fix the language of a PnP PowerShell request. Specifically, I'd like to extract site scripts from a web in a neutral language. Here's what I tried : $cnx = Connect-PnPOnline -...
0
votes
1answer
17 views

Upload invoice to sharepoint

Is there a way to programmatically upload to SharePoint all the invoices related to my tenant (M365, Azure) with all facts like amount, vat? I have a manual process now, but it would be great if I ...
0
votes
1answer
89 views

List Schema XML

I have SharePoint 2013 sites and I have created the task list. Now I want to export that Schema XML using CSOM or PnP PowerShell. Can someone suggest me?
3
votes
1answer
121 views

Get members of a private channel in Microsoft Teams

Connect-SPOService -Url https://site-admin.sharepoint.com $privateSites = Get-SPOSite | Where-Object -Property Template -eq "TEAMCHANNEL#0" Any attempt to get the list of members for a ...
0
votes
1answer
46 views

Powershell script to copy value of Created By user field to another field

I created a custom list and here I want to copy Created By column value to another field in same list Source Field: Created By Destination Field: Item Created User (this is Person/Group Field) I ...
0
votes
0answers
30 views

PowerShell Script for SharePoint Add Item & Update Item gets stuck at $item.Update()

I have ran into kind of strange issue today with my SharePoint 2013 Farm. I have one PowerShell Script(Runs in App Server) to Add Items to a List. Suddenly, this Script is taking very long time to go ...

1
2 3 4 5
80