Questions tagged [powershell-script]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
18 views

How to clear the policy for every site in SPO? -> from the “policy page” in admin portal

I have found a cmdlet which removes all the policy relative to there name of the policy. Remove-RetentionPolicy -Identity "Business Critical" -Confirm:$false -Force It seems that this is a tenant ...
0
votes
0answers
23 views

Powershell Convertto-HTML from list items also outputs raw objects before the actual HTML

I am writing a Powershell Script to read SPListItems, create a PSObject for each, add it to the PS Array and after the loop ends I use the following to convertto-html myArray | convertto-html -path .....
0
votes
1answer
41 views

Export and get the list of Orphaned users from SharePoint 2016 On premises - using PowerShell

I'm using SharePoint 2016 On-premises server, we have two main site collection, I need to get a list of orphaned users in each site collection. I've come across this PowerShell script mentioned here ...
0
votes
0answers
21 views

Sharepoint 2013/PowerShell : Error on item list update with batch

I'm trying to synchronize a list item using a batch from a first site to another site (SharePoint 2013). I tried the PowerShell code (available down below) with 3 list item. The first one did work but ...
0
votes
2answers
33 views

How do I delete a specific folder from SharePoint using Power Shell script?

I have multiple main folders on SharePoint online each with their own sets of sub-folders and files. I need to delete a specific folder (and its full contents including any sub-folders and files) from ...
0
votes
2answers
56 views

How to count number of lines and words in a SharePoint online Page

I am requested to generate a report that illustrates the number of pages and plus the count of words on each page, and the number of files in that site (word, PDF, images..etc.). Is there any custom ...
0
votes
1answer
111 views

Power Shell Error: Exception calling “ExecuteQuery” with “0” argument(s): “File Not Found.”

I am building a script to essentially copy an entire directory to a SharePoint online library. I have gotten as far as building the folder directory on SharePoint but cannot seem to load any files ...
1
vote
2answers
42 views

How to copy a network share directory to SharePoint online using Power Shell

I am trying to write a script using Power Shell to copy an entire Directory (Main Folders, Sub-Folders, and all Files in between) on a Network Share to SharePoint online. The most I have accomplished ...
3
votes
3answers
117 views

SharePoint Online credential is not working in PowerShell

I am able to log in to my SharePoint online site using my credential but when I am connecting to the same SharePoint online site using the same credentials using PowerShell CSOM - getting the invalid ...
0
votes
1answer
25 views

p1 script not running with schedule job

I have SP2010 in WIN2008R2, i have script(datemodifier.ps1) to update the diff of 2 dates in SP list daily, When I run the script manually its updating the list, but when i schedule it with a task on ...
0
votes
1answer
138 views

Powershell script to get workflow tasks for each list item

I have a lot of number of webs (sub-sites) within a site collection that have lists that have list items with Approval workflows running on them. How would I get all tasks for each list item in ...
0
votes
0answers
26 views

How to pick up data using PowerShell from SharePoint Web Parts

We have a manual process at the moment where we have assigned "Content Owners" to out Sites/Sub-Sites. Content Owners, essentially have no greater permissions than regular users, but our Governance ...
0
votes
2answers
87 views

Not getting All FieldValues in Powershell CSOM Sharepoint 2016

I have created powershell script to get File/Folder Size details of Sharepoint site. However, I am not able to get all fieldValues of listItems. I am getting values for $listItem.FieldValues["...
0
votes
1answer
85 views

get list of al users on farm level on SharePoint 2010 application

I am trying run below script on SP 2010 environment for getting list users on farm level. But i am getting error. Can someone please correct me. Powershell script Add-PSSnapin Microsoft.SharePoint....
0
votes
2answers
26 views

Need help on running PowerShell command related to Sharepoint Client ID

By referring i see that i need to run the command but when i try to run i am getting below error PowerShell Command When i run i am getting below error i am new to powershell and i dont know what ...
0
votes
1answer
85 views

Set People picker field with sharepoint group

Is it possible to set a People picker field with SharePoint Group using powershell script ?. Thank you.
1
vote
2answers
106 views

Excel/Powershell to extract substring from a URL

I want to extract root URL from full URL. how to extract that based on number of "/" in that. for example: https://teams.SharePoint.com/sites/site/communities/subsite from this URL i want to ...
2
votes
2answers
2k views

Conversion of csv file to xlsx via Flow or SharePoint

I have a Flow to store email attachments (in .csv format) to SharePoint. Now, I want to use the file in Power-BI from SharePoint. However, I want the file in .xlsx format. Could you please suggest how ...
0
votes
0answers
11 views

Restore/change text/background colors in sharepoint online management shell

I changed colors under properties > colors to improve readability but: 1/ the colors don't reflect the changes I made 2/ I can't restore defaults or make any other changes. I uninstalled and ...
0
votes
1answer
79 views

Less than symbol in formula causes error in calculated column when applying site design

I'm producing a site design script for SharePoint Online in PowerShell using Add-SPOSiteScript as per these instructions, and I can create the script and add it to a site design without any errors. ...
0
votes
1answer
24 views

Change contenttype of all site collection libraries with Powershell

Change contenttype of all site collection libraries with Powershell Hello everyone. I am an apprentice of powershell and SharePoint and I came across the following scenario: I have a collection of ...
0
votes
2answers
58 views

Add Azure AD users to SharePoints groups and document library permissions in bulk

I need to create Azure AD users in bulk (about 90), in order to add each of them: To a SharePoint group present in 90 sub-sites Authorizations from two libraries in each of these sub-sites Example : ...
2
votes
0answers
259 views

Get users who have permission through a sharing link Powershell sharepoint Online

I want to generate a report of every document and permissions on it. Permissions contains General Permission and Users who have permission through a sharing link/ or external sharing link. When I run ...
1
vote
1answer
28 views

How to Sync Exclude from Internet Search Engines with Internal Search using Powershell

I am using SharePoint 2013 On Premises. I am trying modify the values Exclude from Internet Search Engines( Present in Edit SEO Properties of a page, RobotsNoIndex field) with respect to Include/...
1
vote
1answer
325 views

SharePoint online ExecuteQuery command giving exception

I am writing a powershell script to copy the sharepoint online list items from one sharepoint online list to another while that list consist of 77 fields. I am getting below error. While the same copy ...
0
votes
1answer
604 views

Get navigation nodes from top navigation in hub (3 levels)

I'm using PowerShell ISE and SharePointPnPPowerShellOnline to get the TopNavigationBar navigation nodes from a hub site. I want all nodes in all levels. The navigation is 3 levels as you can see on ...
0
votes
1answer
38 views

How to transfer custom features and solutions from one farm to another?

Here is the problem. I've been given SharePoint 2010 farm with pretty huge web app, with large site collection, with custom features, some of which are paid and key required, which I don't have (...
0
votes
2answers
45 views

Powershell Pulling matching strings

I need help pulling every word that contains certain strings(more than one) from particular site and exporting to a file. My code is as follows: Add-PSSnapin Microsoft.SharePoint.PowerShell -...
0
votes
1answer
192 views

getting sharepoint list dropdown value using powershell

I'm trying to get a sharepoint list choice field value using powershell. The choice field contains a yes and no values. now I want to check if it's a Yes and do some logic. foreach($item in $...
2
votes
1answer
42 views

Script to find libraries that have a specific content type

I would like to know if there is a power shell script that will go through all libraries/lists on a single SP2013 farm and give me an output where a certain content type is still in use? I want to ...
0
votes
1answer
2k views

Edit Suite Bar Links in SharePoint 2019

I have tried all of the solutions provided for editing the Text in the Nav Suite Bar in SharePoint 2019. I am trying to change the text from "SharePoint" to "Intranet" or the name of our company. I ...
3
votes
1answer
101 views

Run a PowerShell script interactively on a SPO site (modern)?

So, I've found my perfect PowerShell script to archive Groups in a really nice way. The PS script is interactive and "asks some questions" (Prompt command), so to speak. :) The script looks as follows:...
1
vote
0answers
56 views

SharePoint Content Inventory Using PowerShedll Script

I have a script, where it loops through the whole site collection and starts calculating the size of each list in the site, and calculates each document size (PDF or word document) to determine the ...
1
vote
0answers
30 views

Finding Unghosted page using PowerShell Script in SharePoint 2010

I've a requirement to find out the unghosted page means page which are created using SharePoint designer using powershell script in SharePoint 2007. It should include the custom list forms as well. ...
1
vote
2answers
304 views

Powershell script to list all files in subsite with the content type assigned to them

I have a SP 2013 environment with documents uploaded to the sub site Document centre. I need to know which files was uploaded and which content type (also if no content type was selected) was uploaded....
1
vote
0answers
63 views

How do I get the name and version of the list item workflow from SharePoint 2013 using PowerShell script

How can I get the name and version of the list item workflow as encircled in the image? I have written the below code to obtain the Workflow ID, Title ,Status, Item Name. I got the ID, STatus and ...
0
votes
1answer
561 views

Powershell script that outputs all workflows,their title and status from sharepoint 2013 site that has workflows attached to every list

The SharePoint 2013 site has a few subsites and each subsite has further subsites that have lists in it. To these lists there is a workflow attached. How do I write a powershell script to retrieve ...