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

Powershell script for monitoring folder and run when a new one is created [duplicate]

Help, need a script to copy the files from a fileserver to Sharepoint.This script must monitor the specific folder and run when a new subfolder is created. And uploaded to sharepoint
1
vote
1answer
20 views

Script to copy from fileserver to sharepoint and monitor

I am new at powershell scripting. I am asking for help. I have to create a script to upload folders from a fileserver to sharepoint. The script must monitoring that location( folder). And when a new ...
0
votes
0answers
15 views

How can I uninstall SharePointPnPPowerShellOnline module from PowerShell?

I want to remove any azure/msonline/sharepoint modules from powershell. However I'm unable to remove the PnP module for SharePoint Online Powershell> Uninstall-Module -Name ...
0
votes
1answer
16 views

Get site owner email details only from Owner group using Powershell

I need powershell snippet to get site the owner name and email details only from default site owner group Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue Add-Type -...
0
votes
1answer
25 views

export/download data from sharepoint via powershell based on modified date

I've recently migrated around 200Gb of data to Sharepoint only to be told its got to be moved back... The users are missing some key functionality when accessing the data from Sharepoint, specifically ...
1
vote
0answers
8 views

Trying to update a Document Library field in 150 SharePoint sites

We have 150 customer portals in our SP site collection, all sites are a templated copy of each other - i.e. they all have an Internal Documents, Working Documents and Final Documents. Inside each ...
0
votes
0answers
13 views

How to loop through the Workflow Tasks List using PowerShell in SharePoint 2013

Hi am able to write the code till the Workflow Tasks. Can anyone suggest me how to go to the Lists mentioned in the Workflow tasks as shown in the image below. Please help me to navigate to that list ...
0
votes
0answers
13 views

Sharing Documents with Groups or Users using Powershell

We have a Document Library with Document Sets, each containing a bunch of Documents on employees. An employee should only be able to view specific file(s) within their Document Set. A number of ...
0
votes
0answers
7 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
30 views

Retrieve the user that did the last modification in the site

I must retrieve the name of the user that did the last modification in a given web, using a Power Shell script. I know that retrieving the last item modification date is straightforward, but how to ...
0
votes
1answer
23 views

Get all document sets from a library using its content type id CSOM Powershell

I have to get all document sets from a library using its content type id, using CSOM Powershell. How to acheive this?Can anyone post some links related to this? Regards Swetha
0
votes
2answers
69 views

How to enable Quick edit in SharePoint 2013 using Powershell

Without using Powershell, we are able to enable the Quick Edit as mentioned in the below URL: SharePoint 2013: Create Custom List Template and Set Default View To Datasheet View Programmatically But ...
0
votes
1answer
21 views

PowerShell Function syntax question

I'm trying to get up to speed on PowerShell and have some difficulty understanding how to specify that a function requires parameters. The example that I'm looking at has to different functions, and ...
1
vote
1answer
16 views

Is PowerShell 5 supported in SharePoint 2013?

I have just read the following that seems to indicate PowerShell 5 is not supported in SharePoint 2013. Can someone clarify? Second, most of the code written in earlier versions of PowerShell ...
0
votes
0answers
7 views

Edit CEWS Endpoint?

Basically, that's just it. Instead of removing and recreating the CEWS, I was wondering if I can only update one of its parameters via Powershell. Thx
0
votes
0answers
10 views

Set Target Audiences for Page Viewer (Web Part) using Powershell

Looking to set the Target Audience for one of the Page Viewer WebPart created in site collection for SP 2016. I've created a SP group which is suppose to be added as a target audience using ...
0
votes
0answers
8 views

Create List Item with Taxonomy value in powershell Csom

i need help in creating a list item with taxonomy field value how can i achieve this i hardly cant find any resource for this functionality please help
1
vote
2answers
34 views

Need powershell script(or any) to get page visit count on all site pages in a site collection(for a year)

I'm using SharePoint 2019 and looking to get user visits count on all site pages using powershell or .Net or by any means. I have tried usage report which is not providing the individual pages ...
0
votes
1answer
12 views

Item Update “Value does not fall within the expected range”

If I run each line individually, it works. But If I try to run the script with the for each loop, I get: Exception calling "Update" with "0" argument(s): "Value does not fall within the expected ...
0
votes
1answer
28 views

get all choice values from the field using powershell CSOM

How can we retrieve all the choice values in the choice field using powershell CSOM i hardly could not find any resources for this functionality any help would be appreciated
0
votes
1answer
13 views

Set Item Level Permissions on a SharePoint online library using CSOM PowerShell

I'm using this script below to upload a file or multiple files in a document library in sharepoint online. I would like to set only the 'read' permission so that only one specific user can read (see) ...
0
votes
0answers
11 views

SharePoint 2013 - Modify User Group Permission Level on all sites/libraries where this group exists

Wondering if you can help me, i am not to great on Powershell but require to modify one of our user groups called "Collab Visitors" which in most sites is set to read-only. I want to be able to ...
0
votes
2answers
19 views

update multichoice column using powershell CSOM

how do can we update multichoice column using powershell csom ? we need to update multichoice column for a list any help would be appreciated
0
votes
3answers
42 views

Unable to fine content type by its name SharePoint online Powershell

I am trying to add site columns in my existing content type. Currently this content type is not associated with any lists/Library. I am able to find content type by it's id but I am looking for it's ...
0
votes
3answers
43 views

How can I delete all items in a list from SharePoint2013?

I have a list with over 1000 items. I want to delete these items from the list but a lot of the scripts and suggestions I've read have resulted in errors or null results. I don't want to delete the ...
0
votes
0answers
14 views

How to combine two lists into third list in SharePoint online programmatically?

I have two lists in SharePoint Online: 1. List1["https://siteName.sharepoint.com/sites/Test1"] (Importing items form excel) Fields: Name,Contact,Email 2. List2["https://siteName.sharepoint.com/"] ...
0
votes
1answer
8 views

CSV upload into SharePoint list from Ubuntu

I have a csv file in Ubuntu 16.04 version. I want it to be upload into SharePoint list via power shell. I come to know that powershell core is avalable for this Ubuntu version... But I am not able ...
0
votes
0answers
19 views

Online - Create share link to external user with REST API or Powershell

I'm trying to create share links with REST API or a PowerShell script. This is my scenario: I've a document library in my team site with many folders, each folder refer to an agent. Each agent has an ...
1
vote
1answer
26 views

Using powershell,How to export all subsites,lists with list items(Title,ID,Author) of specific site collection?

I want to export hierarchy of site collections in excel like this using powershell. Site Collection - "https://sitename.sharepoint.com" Subsite1 - "https://sitename.sharepoint.com/S1" ...
1
vote
2answers
29 views

Error while hiding field in Edit form SharePoint Online document library

I am getting error message like : Exception calling "ExecuteQuery" with "0" argument(s): "The node to be inserted is from a different document context." Can anyone suggest what I am missing here......
1
vote
1answer
28 views

PowerShell to import promoted results into SharePoint online

My organisation is migrating from SP2010 to SPO and would like to use PowerShell to migrate the best bets from SP2010 to promoted results in SPO. I currently have a csv file of promoted results and ...
2
votes
1answer
29 views

Extract list of SharePoint lists and libraries

i am using below code the extract all lists and libraries under a site collection . However i need to get the lists and libraries URL too. all other properties return coorect information except URL, ...
2
votes
1answer
88 views

CSOM Powershell eating up memory

What is the proper way to free up memory in Powershell when looping trough list items? This loop is slowly eating up the memory: for ($ID= 94368; $ID -le 98970 ; $ID++) # foreach ($ID in $Ids) { try ...
0
votes
0answers
6 views

How to add email address as parameter while creating sharepoint group using Powershell

I'm trying to create sharepoint group and add site owner using : $Web.SiteGroups.Add($GroupName, $web.Site.Owner, $web.Site.Owner, $GroupDescription) I would want to pass my email address instead of ...
1
vote
0answers
16 views

Get-SPSite pipelining

I'm trying to run the following on a very large farm that has over ten thousand site collections: Get-SPSite -Limit All | Write-Host $_.Url I know that with that many site collections, it would take ...
0
votes
1answer
63 views

Delete O365 groups and SP online site with PowerShell

I was looking for a easy way to delete hundreds of test site in a modern SharePoint online env. MS flow didn't to the trick, so I was looking into PowerShell. Set-Location -Path C:\scripts #Connect ...
0
votes
0answers
24 views

Change position of Title field in list, in Site Design script

When I create a list in a site design script (via createSPList -> Add-SPOSiteScript -> Add-SPOSiteDesign), the Title field is automatically added. I've found out how to remove the Title field by using ...
1
vote
1answer
32 views

SharePoint Classic Experience

I currently had Classic Experience set to all site collections on SharePoint Online, however this morning it has changed all to modern experience for lists and libary. I would like to know what is ...
0
votes
1answer
21 views

automate office 365 health checkup to take screenshot every hour

So the requirement is like this: Login to o365 portal, navigate to health section ( this url https://portal.office.com/AdminPortal/Home#/servicehealth) take the screenshot of the page upload the ...
0
votes
0answers
10 views

Extracting Data from manifest.xsf file using PowerShell

Hi I trying to extract information about the rules that are applied to a number of InfoPath forms, and I am using Powershell to do so. I have unpacked the template.xsn file, and found the manifest....
0
votes
2answers
22 views

Need to update the DOCX file content stored in SharePoint 2013 Library using PowerShell

I have a need to update the DOCX file content using SharePoint 2013 PowerShell. I am using below code to do the same, but once file gets updated and checked in by the code, the files getting corrupted ...
6
votes
5answers
215 views

Batch update via PNP Powershell

I have data from a CSV that will be imported and added to column values for each of these items. I can loop over CSV, get the items, and set the values (Set-PNPListItem) - but the sequential ...
1
vote
1answer
22 views

remove <div> from a sharepoint list with powershell

I have a web part where a user adds a comment into a multi-line text field. It was originally set up as a rich-text field but I need to change it to plain-text for reasons. When I did so, all the ...
0
votes
1answer
17 views

Get Status of SharePoint workflows in the SP farm using Powershell

I am trying to figure out it what properties of $list or $wp return the status of workflow(Completed, In progress, Error Occurred and canceled). or how i can get the status of each workflow in the SP ...
1
vote
1answer
31 views

Copy Permissions : Get-SpSite : Cannot find an SPSite object with Id or Url

I'm trying to fetch the groups, users and roles from a site collection a server to another site collection on another server. I'm trying to get the data using Powershell's Get-SpSite <site url> ...
0
votes
1answer
23 views

Export List of File Names and URLs

Using either Powershell or other method, I need to export a list of titles of files, their filenames with extensions, their locations, and their URLs into a text or Excel file. This is what I have ...
0
votes
1answer
24 views

How to execute powershell script from server1 for deploying wsp in server2

I am trying to run a powershell script in server1 to deploy WSP file present in server2. Here is my code: $password = ConvertTo-SecureString "password" -AsPlainText -Force $cred = New-Object System....
1
vote
1answer
54 views

Powershell command to update enterprise wiki pages without changing modified, modifiedby + do not trigger ER or workflows

I am working on an enterprise wiki site collection inside sharepoint server 2013 professional farm. now i want to write a power-shell command to update some custom fields values for the wiki pages, ...
0
votes
0answers
20 views

Add secondary column to index

On SP 2013 on prem, I am using PowerShell script to add indexed columns to a list. I have managed to add that, like this: $siteUrl = "http://url" $web = Get-SPWeb $siteUrl $listName = "...
0
votes
0answers
36 views

Could not load type 'Microsoft.SharePoint.Administration.DesignPackageType' from assembly 'Microsoft.SharePoint.Client'

When I try to load "Microsoft.Online.SharePoint.PowerShell" got below error. Not sure where I am going wrong here. Microsoft.Online.SharePoint.PowerShell 16.0.8924.1200 ...