Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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]

0
votes
0answers
8 views

Unable to properly disable the alerts within the web application level in SharePoint 2013 server using power shell

I have a requirement to move 500 SharePoint web applications to new server.So before moving the application want to disable the alerts at web application level so that no alert notifications gets ...
0
votes
1answer
21 views

Grant site Members group Full Control of document library in SharePoint Online

Using CSOM in PowerShell, I am successfully breaking inheritance on a document library and removing the visitors group. What I am failing to do is give the site Members group Full Control of that ...
0
votes
0answers
14 views

Changing the filed type from “checkbox” to “Radio Button” has overridden the “ShowInNewForm” property

We have a sharepoint on-premises farm 2013. I have a choice column which display the choices as check-boxes and it contain one option only, as follow:- but doing so have caused issues when filtering ...
1
vote
0answers
12 views

How to republish SharePoint 2013 workflows via Powershell farm-wide

I have a SharePoint farm with Dedicated WFM farm which is working fine, Now i am splitting SharePoint farm in to two farms (Farm A and Farm B) but workflow manager farm will be remain same. Everything ...
0
votes
1answer
22 views

how i can get the property value for “ShowInNewForm” for a site column

I want to know if a field is set to be shown in new form or not. so i run this power-shell script:- PS C:\Windows\system32> $web = Get-SPWeb http://****/order/ PS C:\Windows\system32> $field = $...
1
vote
0answers
21 views

Is there any PowerShell or CSOM script in order to publish InfoPath forms to SharePoint Online?

I need to automate my task of publishing InfoPath forms to SharePoint Online using Powershell script or CSOM code.
0
votes
1answer
14 views

powershell edit user profile field with MFA

I have several scripts to edit user profile fields through Powershell without active MFA. Sure I can have a user with a complex password outside MFA but I don't want that. Can anyone point me to one ...
0
votes
0answers
20 views

Exception calling “GetPublishingPages” with “0” argument(s): “Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))”

I'm trying to manage a number of publishing sites through PowerShell. It's fine on nearly all of them, but one of my publishing sites seems to have a problem. Consider the following PowerShell script:...
1
vote
1answer
20 views

SharePoint 2013 PowerShell List all Groups with Full Control

We have a huge SharePoint environment and not every Owner's group or admin group have full control on their site. I am looking to see if someone already made a script to show which group in the farm ...
0
votes
0answers
31 views

SharePoint modern experiences

Hope you're well; I would like to know what is powershell script to turn off modern experice for list and libraries in SharePoint Online. kind regards, Anees
2
votes
1answer
21 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 ...
2
votes
3answers
20 views

Copy attachments from list to another list

In this script, i want to to copy an item from list to another list. This item contain an attachments. How i can add the attachments to my code $web = Get-SPWeb http://intranet/sales/ $listSales = $...
2
votes
2answers
27 views

Updating User Profile photo O365 using Powershell Script

I am using PowerShell script for updating the User profile properties of nearly 17 items from a Picture library(named 'Employee Details') in a site. All fields get updated except Profile photo. When ...
0
votes
2answers
36 views

SPSite can't find site

We recently began using a load balancer to force HTTPS on our SharePoint, and the PowerShell code below can no longer find the site. I've tried using both https://mysite and //mysite, with the same ...
1
vote
0answers
12 views

Update all BCS Field in SPSite using Powershell

When i delete an item in my external list, it's not deleted automatically from the list where i use the BCS Field. I have to click Refresh. I'm using this BCS in many lists. I'm looking for a ...
1
vote
0answers
20 views

WebParts Removed From Web.config After WSP Deployment

I have a SharePoint 2013 web site with custom web parts. Lately, I've been running into an issue in which all the safecontrol elements that correspond to my custom webparts disappear from SharePoint'...
2
votes
1answer
46 views

Powershell Error “The term 'Get-Spsite' is not recognized as the name of a cmdlet, function…”

I just typed the follow to try and get my SharePoint site: $site = Get-SPSite -Identity $siteID And I get the following error message: The term 'Get-SPSite' is not recognized as the name of a ...
3
votes
1answer
57 views

Powershell connect to SPO, not as SPO admin

I'm trying to connect to a SPO tenant using PowerShell, using MS documentation here: https://docs.microsoft.com/en-us/powershell/sharepoint/sharepoint-online/connect-sharepoint-online?view=sharepoint-...
1
vote
1answer
34 views

Create Content Types via Powershell and CSV

I´m struggling since hours to create content types via script and csv. The first problem is, that I want to compare existings content types within a sitecollection and the one in the csv. But it ...
1
vote
1answer
43 views

Could not authenticate to SharePoint Online using OAuth 2.0

I am using following commands to connect to my SharePoint Online environment. Connect-SPOService -Url "https://testdomain.sharepoint.com/sites/test1" Connect-PnPOnline -Url "https://testdomain....
1
vote
1answer
13 views

Word.Application ComObject on Powershell Cannot Open File from SharePoint Online

I'm writing a PowerShell script to update a Word document's content in the SharePoint Online Document Library. Below is the script so far. The issue is the $document variable value is null when ...
0
votes
1answer
16 views

Create Item with powershell crush the execute of the workflow

In the Sharepoint 2013 List, I created an item using Powershell. Once the item is created, the workflow is launched but it's cancelled then. I maked logs in the beginning of my workflow : "Log Current ...
1
vote
0answers
11 views

Unable to add Custom ribbon on share point default landing page

I am trying to add custom ribbon on the default home page of the sharepoint online site. For some of the site collection the home page 'default.aspx' shows the custom ribbon but for some of other site ...
1
vote
1answer
24 views

Is there a way where we could provide “Read” permissions to a user to a SharePoint Online site using Powershell

I am trying to create a powershell script via SharePoint Online Management Shell, where I will provide "Read" permissions to a user. Most of the articles I read is that we could only add the user as ...
0
votes
1answer
22 views

converting certain words in file name to upper case for all files in document libary

I am looking for a powershell or may be flow approach to convert certain words used in Sharepoint file name to upper case. For example,a document library contains about 200 files. Each of these files ...
1
vote
1answer
57 views

converting certain words in file name to upper case for all files in document libary

I am looking for a powershell or may be flow approach to convert certain words used in Sharepoint file name to upper case. For example,a document library contains about 200 files. Each of these files ...
0
votes
1answer
18 views

To check a site collection contains variation or not using powershell

We are migrating to SharePoint Online and we want to check that which all sites are using variations in SharePoint 2013. Is it correct that if a site contains variation labels then that site is using ...
0
votes
1answer
20 views

PowerShell - Activate Service Plan License for all Users of one Region

In Office 365 licenses and service plans can be set by PowerShell. There are several licenses available such as "ENTERPRISEPACK" which is the code for "Office 365 Enterprise E3". Within the enabled ...
1
vote
0answers
34 views

Custom BCS indexing connector: custom Managed Property is empty

I've created a custom indexing connector for SharePoint 2016. The connector works but only the auto generated managed properties (grayed out) are filled. If I create a new managed property and map it ...
1
vote
2answers
21 views

SharePoint PowerShell Filtering a List by an Array

Let's say I have an array $PermitIDs = "1","2","3","4","5","6","7"; I want to find where these are in the array field of a list, kinda like so: $ListItems= $List.Items | where-object {$_["ID"] -...
1
vote
1answer
34 views

SharePoint 2013 Powershell: Exception calling “AddPublishingPage” with “2” argument(s): “Access is denied”

So, I'm trying to create pages via powershell, script below: # Get the SiteURL $SiteUrl = "https://MySiteCollectionURL" # Get the WebURL $WebUrl = "https://MyWebURL" # Get the PageLayout $...
1
vote
0answers
28 views

Find deleted objects from Online SharePoint calendar

I am not sure what is wrong with my code to retrieve the list of the events exist in my online sharepoint calendar without the deleted events: Add-Type -Path "C:\Program Files\Common Files\...
0
votes
1answer
25 views

Use an input-box instead of putting the credentials in code

I have made a script that I would distribute to my college's. It's a Powershell script using CSOM to connect to a SharePoint-Online environment. What I would like is to create an input box where my ...
0
votes
2answers
35 views

Modify PowerShell script to upload all Folders and Files to a Sharepoint Library

I would like to modify the Powershell Script found at the following site: https://gallery.technet.microsoft.com/Tool-to-upload-files-ba0273ee I would like to upload all Folders, subfolders and files ...
0
votes
0answers
15 views

Impload a CSV file on my laptop to share point

Can someone please help me on providing a powershell script that will import my CSV file to sharepoint. I don't know what to use in order to do that.
4
votes
1answer
129 views

upper/lower case naming convention for Document name in SPO Doc Lib

I have a situation where users have uploaded several files but without any naming convention. So some of the file names are in upper case while some are in lower case . So Now I have to build a script ...
2
votes
1answer
33 views

Powershell to create top link navigation

I want to create top link navigation items via powershell script to multiple sub sites, can anyone help? You may wonder why can't we add it manually via navigation, I'm using SharePoint 2019 ...
0
votes
1answer
20 views

How to get the view of a SP list in PS code

I have this code: $List = $Context.web.Lists.GetByTitle("MyList") $Query = New-Object Microsoft.SharePoint.Client.CamlQuery $ListItems = $List.GetItems($Query) $context.Load($ListItems) $context....
0
votes
1answer
19 views

Get the columns name of a Sharepoint list when the columns name has spaces in it

I have code that gets all the items of a SP list and export it to CSV. In the code below I have specify the column called "00:00 - 07:59". But it doesn't work because the columns name got spaces in it....
1
vote
2answers
19 views

Powershell: When to call Dispose() on SPweb/SPSite variables?

I have been reading and I've found different approaches about when to use Dispose() I want to know if when using SharePoint 2016 Management Shell I will need to call it for the following cases: $...
0
votes
1answer
27 views

SharePoint Online : Powershell get id from document set created

I have created a document set by powershell and I would like to get ID of the document set created to update name with this ID. where Name of the document will be in format Name_ID I m not able to ...
1
vote
1answer
25 views

SharePoint online audit

How to get sharepoint online audit data programatically without using Search-unifiedauditlog commandlet.
1
vote
1answer
35 views

How to display workflow name and workflows in progress count from SharePoint 2013 using PowerShell

I am able to navigate till workflow associations. Can anyone help me to display the workflows in progress count and the workflow name
0
votes
1answer
26 views

create a clientcontext if legacyauth is false

How to create a client context if legacyauthprotocol is set to false.without changing the legacyauthprotocol using csom.
2
votes
2answers
44 views

PowerShell: Generate a report of all items across a site collection where a column has a specific value

I am trying to come up with a script to do the following in my SharePoint 2013 environment, and have not had much luck. I need a script that will generate a report/csv that will list all items in ...
1
vote
1answer
24 views

Export Additional Columns in Version History Export SP 2013

I found this solution on this forum and was able to pull some information but with the workflow we have on the list, we need more information. We have an "Approval Status" column that we can see when ...
1
vote
1answer
19 views

Powershell script to check if the migrated document libraires contain all the on-premises verisons

we want to migrate our sharepoint on-premises 2013 sit e to SharePoint online. and some document libraries contain very important documents to us. where these docuemnt libraries have minor and major ...
0
votes
1answer
30 views

Powershell script to find sites having property bag in sharepoint 2013

We are using SharePoint 2013 and there is one property bag having key as "DATA". i want a powershell script to know in what all sites this "DATA" property is there and what is the value of this in ...
2
votes
1answer
30 views

Issues retrieving SharePoint Online Audit Data

When I try to retrieve the Sharepointonline audit data using search-unifiedauditlog .For an particular site it seems to be getting only pageview where as other events are not able to be fetched Even ...
1
vote
2answers
33 views

The current user is not a tenant-administrator

I have owner right of a teamsite. But I am no tenant administrator. I only want access with PowerShell to my own teamsite not to the whole farm. But I found this code below to logon to sharepoint-...