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
1answer
48 views

How to loop through all the pages in site pages

I want read all the pages web part which is resides inside the site pages across site collection, sub site level. The code is below $site = Get-SPSite # This is enough to select all webs in site ...
0
votes
0answers
28 views

WebServiceProxy in SharePoint online

I was using PowerShell to update items in SP On-Premise and now the sites are migrated to SharePoint online. The PowerShell scripts updates multiple lists using WebServiceProxy and it doesn't seem to ...
0
votes
1answer
125 views

Error - Connect-SPOService : Method not found: '!!0[] System.Array.Empty()'

I'm trying to connect to SharePoint online tenant using the below PowerShell script but I get the error: I'm sure the script is correct because it works fine on other machines. But on one particular ...
0
votes
2answers
44 views

Sharepoint REST query returning 100 results no matter what filter I use

I am trying to execute a REST query on a Sharepoint 2013 list with Powershell, but I'm always getting back more results than I want. Even if I filter the query to only get back 1 list item, the query ...
0
votes
2answers
158 views

How to schedule a SharePoint Online Powershell script to run everyday?

We have been scheduling SharePoint on-prem Powershell scripts using Windows Task Scheduler to run at a specific time But how do i schedule a SharePoint Online Powershell?
0
votes
1answer
88 views

Get-SPOSite how to get all sites on my tenant with a Sensitivity label = Highly Confidential?

Get-SPOSite how to get all sites on my tenant with a Sensitivity label = Highly Confidential? The Powershell command Get-SPOSite gets all sites on my Office 365 tenant. How could I filter all site ...
0
votes
0answers
7 views

Identifying where External Content Types are being used in a particular site and list in SharePoint Using PowerShell

I am migrating ECT's from SP13 to on prem SP19 (we migrated the entire site by mounting the content DB first to a 2016 farm then to our 2019 one) some are working some are not. Although I can create a ...
0
votes
1answer
143 views

Create content type template using Power Shell

I want to create the content type using power shell. By using created content type with need to create the content type template using power shell script.
0
votes
1answer
23 views

Not able to connect to SharePoint Online Site

I have tried the same code in with another domain site on my laptop, works fine. But, when I run the same script on a Windows Server 12 R2 on another domain site it throws an exception as shown in the ...
0
votes
1answer
33 views

How can I get the list of broken link of one drive by Powershell script?

How can I get the list of broken link of one drive by Powershell script? I have got the copy link Url by $linkShortCut = [Microsoft.SharePoint.Client.Web]::CreateAnonymousLink($ctxClient, $itemUrl, ...
0
votes
0answers
42 views

SPO PowerShell to Get users who have permission through sharing link

I'm using the below script to find all list and library items that are shared(to internal and external users) in a SharePoint Online site. I am able to identify the documents which are shared but not ...
0
votes
1answer
37 views

Enable Tree View Navigation using Power Shell script

I want to enable tree view navigation in a site collection and sub site level using power shell. Power shell script loop through site collection and all sub sites and turn on Enable Tree View ...
0
votes
0answers
27 views

Custom Action: get the full URL

I want to add custom action which opens the external link and passes the current URL as a parameter. Something like: https://external.aspx?&url=https://company.sharepoint.com/sites/testSite/...
0
votes
1answer
18 views

How To read User Information List In SharePoint 2013 Using Power Shell Scripts

I want to retrieve all the user email id, display name, user name & Title from user information list using power shell
0
votes
0answers
15 views

Adding variables into array via powershell for SharePoint list

I am trying to update the "Title" column in a SharePoint list (List has multiple "Titles" with the same name) and want to update all items where the Title matches I have used the following: $web = ...
0
votes
2answers
72 views

Export to CSV file

I am able to read the SharePoint web part properties and values using below code and able to export it. But after exporting, when i open the file could not find exact values. Find the code below: $...
0
votes
1answer
16 views

Analytics usage report timezone

We are using SP2016 enterprise. In Site settings -> Popularity and Search Reports, we can download the usage report. The report is generated based on GMT 0 timezone but all my users are located in GMT+...
0
votes
1answer
28 views

How to assign object to variable in Powershell

I am trying to assigned a variable from a search object : $tes = $ListLookup.Items | where-object {$_.title -eq "TEST"} | sort Title | FT ID So the above brings back the ID of the item I want. But ...
0
votes
1answer
50 views

Delete My sites without affecting user profiles

I want to delete my sites without affecting existing user profiles and also want to disable my sites creation. I know to delete site collections using powershell script but want to know, is there a ...
0
votes
1answer
18 views

Add new item to list with lookup value from another list via powershell

I have trying to add new item via powershell to a list that has a column with a lookup to another list $NewItem = $list.Items.Add() #Add properties to this list item $NewItem["Title"] = "...
0
votes
2answers
61 views

Read the content of web part

I have content editor,script editor, image viewer etc.. part on share point homepage. I am able to read the web part properties. Now i want to read the content or values of that web part using power ...
0
votes
1answer
88 views

The remote server returned an error: (500) Internal Server power shell

I am trying to load the on premise SharePoint site using below PowerShell code: Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint....
0
votes
1answer
23 views

Ho to verify if event receiver is custom or default in share point 2013

I have requirement to get all the list of event receiver names(Not Default) in a share point 2013 site which are custom. Kindly guide me on identifying the custom receivers only. Thanks in advance! ...
0
votes
1answer
37 views

Get ItemChild properties using Powershell Script SharePoint 2013 document library

We have a document library which contains multiple document set we have below requirements : Get all document set properties like Name, Created Date, Modified date. Get all ItemChild (document ...
0
votes
2answers
118 views

Read the web part properties from page using Power Shell

I have on prime SharePoint 2016 site which has couple of web part on the homepage.I want to read the web part properties from the page and Export the data to CSV file using Power Shell commands.
1
vote
0answers
44 views

List/Report of all active Shared Links in the SharePoint Online tenant using PowerShell?

Is there a way to generate a List/Report of all active Shared Links in the SharePoint Online tenant using Powershell? I know that we can find that in "Security and Compliance" admin center audit logs....
0
votes
2answers
246 views

Powershell : Read excel file data in document library and then modify it and upload it back using powershell in SharePoint Online

I am looking for powershell solution which will read xml file in document library and loop throgh all rows and add/modify rows/columns on the excel file and upload it back to sharepoint. Tried ...
0
votes
0answers
23 views

Special characters and Graph API

I'm using Graph API with PowerShell to send a message to Teams, which is ok, BUT the problem I get is with the special characters like french letters é etc. Instead of the é, I get a question marks ...
0
votes
3answers
134 views

Sharepoint Online: Get List Items from Documents List with over 5000 Items using Powershell

My goal is to create a powershell script that will change the created by value in my Sharepoint online documents list. Fyi this list contains 10005 items. I'm at the very beggining and already stuck ...
0
votes
0answers
44 views

Get-spproduct -local stuck

I launched a get-spproduct -local command through PowerShell with the farm account, however, it ran now for almost one hour. Got the same behaviour with stsadm -o localupgradestatus. It just runs and ...
0
votes
1answer
432 views

Convert the Powershell script to Python 3

I'm trying to perform an upload files from Linux to share point using Python. However I tried a lot by googling but nothing help. At last I got a power shell script that is working. So requesting for ...
0
votes
1answer
17 views

Download files from a sharepoint document library that has exceeded the listview threshold

I'm trying to download all documents from a SharePoint library that has more than 200K documents and has obviously exceeded the listview threshold and I haven't been able to find a script that will ...
1
vote
2answers
472 views

Set-SPOSite not working for Group enabled SharePoint Online sites

I'm executing the below script to disable one of the document sharing options: set-sposite -Identity "https://tenant.sharepoint.com/sites/useraccessmanagement" -DisableCompanyWideSharingLinks ...
0
votes
0answers
9 views

Try Catch not trapping error

I'm running posh 4.0 on Windows Server 2012 R2. When this line is reached and the $site variable contains a non existent site, the error is not trapped and instead the generic error is displayed. ...
0
votes
1answer
15 views

Update URL's link Inside Office (docx, xlsx) documents

We need to change the root of our SharePoint 2013 Document Management site collection due to a company ownership change from Sharepoint.acb.net to Sharepoint.xyz.net. I configured everything using the ...
0
votes
1answer
11 views

Unable to set sharepoint workflow job property

I'm trying to to run the below command but error which I have never seen before. I have ran this many times never got this error. stsadm -o setproperty -propertyname "job-worfklow" -propertyvalue "...
0
votes
0answers
44 views

get-pnpfile but import into an object

I'm using PNP powershell to connect to SPO and download files using get-pnpfile, while initial test are good for downloading files, what I really want to do is download the file into an object rather ...
0
votes
2answers
38 views

Remove anonymous link from SharePoint thanks to PowerShell

I am currently working on a script that should remove an anonymous link from SharePoint using Powershell. I don't know where to start and i would like to know if somebody has an idea on how to do it. ...
0
votes
2answers
63 views

Error in copying file: The specified user could not be found

I'm copying the files between site collection document libraries in share point online using the below script but it failing to copy the files when the author of the files no longer exists. Below is ...
0
votes
1answer
41 views

CAML in Powershell within 2 dates

I've been tweaking my code with various solutions discovered here and elsewhere with no luck so I figured its time to ask for help. I'm using Posh ver. 4.0 on SP 2013 Enterprise on-premises. I have a ...
0
votes
0answers
9 views

Add Email ID along with the domain names in all the groups - SharePoint 2016

Currently in my SharePoint 2016- On premises, i've requirement that i need to add the email ID of the users in all the SharePoint groups in the site, and already the user accounts of the same users ...
0
votes
1answer
179 views

Restoring Thousands of Items From Recycle Bin

This seems to be a common occurence with our users and OneDrive. One user tried to free up space on their hard drive and deleted 35K documents from a synced document library in SharePoint Online. The ...
0
votes
1answer
31 views

You cannot call a method on Null valued expression at: $File = $Web.GetFile([Guid]$Result.Id)

I have queried AllDocs table using Powershell and can see GUID values of Id, SiteId and WebId, But I am getting Error: You cannot call a method on Null valued expression at this line below: $File = $...
0
votes
0answers
38 views

Need to Open Word Document From Sharepoint Document Library and delete all comments from the word Document

I refered Remove all comments and comments block in a Word-Document (.docx) using PowerShell But here the code need a local path but i need to open word from sharepoint online document library using ...
0
votes
2answers
43 views

SharePoint Online - Possible to create a list item with an ID which was already deleted

I have a SharePoint Online list where the ID of the latest item created is 2006. The list has some custom parent, child functionality where the ID of the parent item should be smaller than the child ...
0
votes
0answers
34 views

SPO Site SWAP Communications site with Tree View/ left panel structured navigation

I'm trying to invoke a site swap using powershell. Invoke-SPOSiteSwap -SourceUrl [site URL] -TargetUrl [site URL] -ArchiveUrl [site URL]/sites/archive I get the error message: The Site is not a ...
0
votes
2answers
71 views

Update orphan users with active users in sharepoint online

I need to find out inactive users and replace them with active users as I am getting an error while copying the documents through PowerShell script due to author of the file no longer exists. I know ...
0
votes
0answers
20 views

Cannot write applicationHost.config file while running New-SPWebApplication and PSCONFIG

When I use New-SPWebApplication I am getting error below error in SharePoint 2019 I am using SharePoint Farm Admin account. After searching lot, I found out that after enabling Distribution Cache ...
1
vote
2answers
713 views

Problem with login to Sharepoint Online using Powershell

See image. I am getting the error "Exception calling "ExecuteQuery" with "0" argument(s): "The sign-in name or password does not match one in the Microsoft account system." when I try to connect to SP ...
1
vote
2answers
77 views

SharePoint Online - Possible to update ID column value in a list for an existing item?

In SharePoint Online, Is there a way to update the ID column(for an existing item) in a list with our value? We have a SharePoint list where I want to update the ID column value with my own value. I ...

1 2 3
4
5
78