Questions tagged [powershell-script]

The tag has no usage guidance.

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

How do you Update SharePoint 2016 On Premise SubSite Choice Fields using Powershell?

I have a Site Collection with many subsites that all have the same Custom List (CustomList1) and Choice Column (ChoiceColumn1 - List Columns not Site Columns). I successfully added a field value to ...
user avatar
  • 435
0 votes
2 answers
47 views

Get service account details and their usages in SharePoint Environment

We have lots of service accounts in our SharePoint environment, now we are planning to delete the unwanted service accounts from our environment to keep the environment clean. So, I was checking ...
user avatar
0 votes
0 answers
45 views

Get all Libraries With No Retention Label

I need a help with PowerShell to generate a report with list of all the Libraries With No Retention Label from the SharePoint tenant Does anyone have a script Is there any way to loop this to all the ...
user avatar
2 votes
1 answer
240 views

How to export powerapp solution (.Zip file) using powershell or pnp script?

I need to download the PowerApps(canvas app) solution package(.Zip file) by using PowerApps PowerShell script or pnp script. Anyone suggest me if it is possible.
user avatar
  • 1,095
0 votes
1 answer
26 views

Can anyone provide automate script to add/deploy/update solution in SharePoint 2016

Can anyone provide automate script to add/deploy/update solution in SharePoint 2016. So that developers can run this batch file without help from SharePoint Administrators. And please suggest me best ...
user avatar
0 votes
0 answers
28 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: &...
user avatar
0 votes
1 answer
578 views

Delete unique permissions of a File or Folder in a document library

I have a document library which has 3 folders in it and inside each folder there is a document (docx, xls, ppt). My objective is to iterate every file inside my document library and check if It has ...
user avatar
  • 1
0 votes
1 answer
100 views

Q. SharePoint Online - Setting LockState property via PowerShell not successful and no error reported

I have been attempting to Unlock a ReadOnly site in SharePoint Online. I have tried with PNP Connect-PnPOnline $SiteURL -Credential $Cred Set-PnpSite -LockState "Unlock" I have tried with ...
user avatar
0 votes
2 answers
146 views

Add and delete Sharepoint Groups from site

Thanks for you time reading this. We are a Technical School that's using Sharepoint 365 as way to collect files and resources. We have to open a Sharepoint to each class and I'm compiling a Powershell ...
user avatar
0 votes
1 answer
65 views

How to verify retention labels at site level?

In our SharePoint Online, we have n number of sites where retention labels are being assigned for the contents. Though, we are not sure if we have labeled everything and would like to verify what has ...
user avatar
  • 1
0 votes
1 answer
1k views

Get-PnPList cmdlet not returning anything

I'm trying to retrieve information from two columns on a sharepoint list in order to use them in powershell. Here's my code so far: $SiteURL = "https://xxxx.sharepoint.com/sites/xxxxx/" ...
user avatar
  • 75
0 votes
1 answer
100 views

Caml Query | How to copy today's list items from one SharePoint online list to another in batches?

I am trying to write a Caml Query to get only today's list items and then later copy it into the new list. I am using the batch method to copy data from source list to destination. source list gets ...
user avatar
0 votes
2 answers
2k views

How to get all column and type and internal name in my site by PnP PowerShell

I'm using ModernUI for SharePoint Online. I'd like to get all List and Library's ColumnName, Type, InternalName in my site by PnP PowerShell. I did some research myself, but I didn't understand, so I ...
user avatar
  • 85
0 votes
1 answer
33 views

Sharepoint 2013 - Script to Allow Sharing Site or library only to administrators

I'd like to disable sharing to all members except administators on ALL Site Collections. Is there a Powershell command that match my request ? Or maybe only admistrators will approve sharing request. ...
user avatar
  • 5
0 votes
1 answer
15 views

Workflow to be run for every specific document or content type?

I will need to look for the solution to implement the manual script initiation for specific file type in the document library (ex. force unlocking a document). Idea is that I will add additional ...
user avatar
1 vote
1 answer
34 views

Best way to chain together two SPO cmdlets

In the Sharepoint Online Management Shell my goal is to call the cmdlet Invoke-SPOSiteDesign (doc) with one fixed Design (i.e. the -Identity parameter) onto all SPOSites on my tenant. I can get all ...
user avatar
  • 113
0 votes
3 answers
412 views

several site collection add into "Readonly" mode using powershell script

We have 100+ site collections on csv file and we need to mark all sites into "Read Only" mode access based on csv file using powershell script. Anyone suggestion highly appreciate. we am ...
user avatar
1 vote
1 answer
403 views

Is it possible to create a one note file in SharePoint document library from Powershell

I was hoping if someone has created a OneNote notebook file from Power Shell command and stored it in a document library in SharePoint Online. We can create sections and page of OneNote file from ...
user avatar
  • 1,746
0 votes
0 answers
143 views

Getting Forbidden error while connecting to SP Online using CSOM Powershell

I have one powershell script where I am connecting to SP 2013 Library to download a file using Server side powershell script. After That in the same script file I am trying to connect to SP Online ...
user avatar
0 votes
1 answer
341 views

How to update "Lookup column" values from csv to Sharepoint Online using Powershell Script?

I have a Parent list called country and the child list where I want my values updated is call Continents. the lookup filed name in Continents is "Country". Any help will be greatly ...
user avatar
0 votes
1 answer
49 views

How to get last crawl duration in SP 2013 using power-shell

I'm using the below PowerShell commands to get the last crawl duration. when the Crawl In-progress the 'Crawl Completed' field is empty, I the output as duration in negative values. Could you please ...
user avatar
0 votes
2 answers
669 views

Check who has given permission to a user in sharepoint online

In sharepoint line for a site I have a few site owners. One owner has stopped inheriting permissions for a library and a folder and gave access to a user. As a tenant admin I want to know who that ...
user avatar
0 votes
1 answer
377 views

powershell script to replace a user Identity with a different identity

I'm having SharePoint 2016 On-premise environment, now we have a requirement as follows. we have nearly 100 SharePoint Groups, where we had already have many user's identity added as DOMAIN\username ,...
user avatar
0 votes
1 answer
130 views

SharePoint site is lock

I ran below script to unlock SP site. $admin = new-object Microsoft.SharePoint.Administration.SPSiteAdministration (“Site-Collection-URL”) $admin.ClearMaintenanceMode() Getting below error message ...
user avatar
1 vote
1 answer
366 views

security error:script execution is disabled on this system:I can’t access Sharepoint from Powershell

I am in the process of configuring my Sharepoint Framework development environment, I installed node.js and visual code everything is fine but after the powershell level I ran into this error that I ...
user avatar
0 votes
0 answers
333 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 .....
user avatar
  • 1
0 votes
1 answer
867 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 ...
user avatar
0 votes
2 answers
523 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 ...
user avatar
0 votes
2 answers
456 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 ...
user avatar
0 votes
1 answer
1k 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 ...
user avatar
1 vote
2 answers
544 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 ...
user avatar
3 votes
3 answers
684 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 ...
user avatar
0 votes
1 answer
47 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 ...
user avatar
0 votes
1 answer
654 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 ...
user avatar
  • 31
0 votes
1 answer
61 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 ...
user avatar
0 votes
2 answers
623 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["...
user avatar
0 votes
1 answer
216 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....
user avatar
0 votes
2 answers
34 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 ...
user avatar
0 votes
1 answer
353 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.
user avatar
1 vote
2 answers
792 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 ...
user avatar
2 votes
2 answers
12k 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 ...
user avatar
0 votes
0 answers
25 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 ...
user avatar
  • 559
0 votes
1 answer
243 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. ...
user avatar
0 votes
1 answer
31 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 ...
user avatar
0 votes
2 answers
153 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 : ...
user avatar
4 votes
1 answer
2k 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 ...
user avatar
1 vote
1 answer
77 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/...
user avatar
1 vote
1 answer
821 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 ...
user avatar
0 votes
1 answer
2k 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 ...
user avatar
0 votes
1 answer
84 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 (...
user avatar