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
4 views

SharePoint Term Store Usage

I've been tasked with cleaning up a Term Store. The term store has six Term Groups each with a couple of Term Sets. By the looks of things someone has "played about" with creating a ...
0
votes
0answers
8 views

SP 2013 My site Update-SPProfilePhotoStore PS command error

I've setup a new my site page for a client on SP 2013. I'm having trouble getting the profile pictures to update. After searching here at stackexchange and google I see some info about this but ...
0
votes
1answer
686 views

Delete all Enterprise Keywords in Sharepoint Online

How can I delete all Enterprise Keywords in our Sharepoint Online. It seems that the Term Store is already populated with many, many entries. Is there a way to "reset" or delete all Enterprise ...
0
votes
1answer
21 views

Unable to add item with a lookup column value using CAML query

I have a PowerShell script that add's a new item to a list which has 2 lookup columns to different lists first part of the script add's the item with the correct lookup value: $ListLookupitem = $...
1
vote
2answers
11 views

Check if a Person or Group column is empty in PowerShell

I have a Task owner column in SharePoint which is a Person or Group column. I am trying to check if this column is empty in Powershell if($_["Task Owner"] -eq null) This gives me the below ...
0
votes
2answers
937 views

Same Content Type Display Name, Different Internal name

I know that you can have internal names and display names for columns but can you also do that for Content Types? For example, we have the following with our current powershell script: ...
0
votes
1answer
1k 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 ...
1
vote
1answer
2k 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....
0
votes
1answer
810 views

$list.RootFolder.Url empty

I get an empty url when I try to retrieve the list root folder url. I use these Powershell commands on a Sharepoint 2010 server. $web = Get-SPWeb -Identity "http://mywebsite" $list = $web.lists["My ...
0
votes
1answer
683 views

How to change item Permission on Sharepoint Online Powershell

I want to ask a question, how to change permission to the element by Sharepoint Online ? How could I identify user. Could I Identify user by email ? Or it should be done only by account ?
0
votes
2answers
31 views

Adding new site language via PowerShell

i am trying to add new site languages via PowerShell with this code: $Context = Get-PnPContext $Web = $Context.Web $Context.Load($Web) Invoke-PnPQuery $Web.IsMultilingual = $true $Web....
1
vote
3answers
620 views

Importing date items to SharePoint list does not show the correct date

I am using a PowerShell script to import list items from csv file to another SharePoint list $SiteUrl = "http://mysite" $ListName="Contacts" $ImportFile ="c:\Scripts\EmpData.csv" #Setup Credentials ...
0
votes
1answer
17 views

Set Target Audience to the list using Power Shell Script

I’ve a list called “ABC” in root SharePoint online site collection and it have no. of columns. One of the column, say “xxx” is type of “Hyperlink” field which contains the Sub Site URL with display ...
0
votes
2answers
14 views

Deleting all document versions but the current from a SharePoint document library using PowerShell

I have a SharePoint document library with a large number of documents and versions. My task is to create a PowerShell script to delete all versions but the current for each document. When I tried to ...
0
votes
0answers
11 views

Unable to query SharePoint list by date using CAML and PowerShell

I am trying to use a CAML query through PnP powershell to get a list of items. My code looks like this: $today = get-date -Format "yyyy-dd-MM" $today = $today + "T00:00:...
0
votes
1answer
26 views

SP13 Quickest Way to get pages to pdf

Scenario: I have a bunch of wiki page .aspx files maybe over 100 files. I want the quickest way to move those pages to 100 files into pdf and not open one page at a time. This is a popular topic and ...
0
votes
1answer
703 views

Print all .aspx pages within pages library to PDF

I have a requirement that requires that all .aspx pages in my 'Pages' library (Publishing Site) are printed every so often so that a physical record of that publishing page can be kept. Would it be ...
0
votes
1answer
26 views

Sharepoint online powershell usercustomactions scriptblock not working

I want to add a warning message at the top of the SP online site. For that i tried UserCustomActions using powershell, code is running without error but not working. I tried to add ribbon control that ...
0
votes
2answers
32 views

PowerShell script to set SharePoint list to read only

Can any one help on how to set the SharePoint online site List/Library to read only using Power-Shell script?
0
votes
1answer
887 views

How to change text encoding when inserting values inside a sharepoint list using powershell?

I'm using french words with special characters like "é" "à" etc. When I trying to insert text in my list fields using powershell, it does insert the values but the characters aren't well encoded. For ...
0
votes
2answers
39 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 ...
0
votes
1answer
35 views

Pnp PowerShell to hide the SharePoint list

I’ve a list called “A” in root SharePoint online site collection and it have no. of columns. One of the column, say “xyz” is type of “Hyperlink” field which contains the Sub Site URL with display text,...
0
votes
1answer
725 views

get all recursive terms from termstore powershell

I have a requirement where I need to match a string value with all the terms in a given termset ID. My termset contains terms inside terms(recursively) until 5 levels. My Current Code : $...
0
votes
1answer
13 views

Unable to identify and delete SharePoint 2013 site users by using Sids through Powershell

I have set of Sids provided by client to delete the respective users from site permanently using share point 2013 power shell. Firstly, I tried below script to get user by sid as below, but it does ...
0
votes
1answer
732 views

Determine via code if workflow is stuck in error state

There is a workflow (Visual Studio and SP 2010 style WF) that seems to be getting stuck every so often when it errors. I see the item in the WF history for the list item saying something like "An ...
1
vote
0answers
54 views

Is there a way to save a site in SharePoint online as a template programmatically (with an API, PowerShell, C#, etc.)?

I have a SharePoint Online site that has custom scripts enabled, and I want to programmatically save it as a template. I do not want to use PnP Provisioning Templates, I want to access the same ...
1
vote
0answers
29 views

Is there an API or web service for Copy-SPSite?

What API endpoint is called for the command Copy-SPSite? Also, is there a WSDL web service for this command, like there is the ExportWeb service in Sites.asmx relating to the command Export-SPWeb?
2
votes
1answer
703 views

Get Selection from Lookup Table CSOM PowerShell in Project Server

I have a custom field at the project level that is a lookup table (single select). I cannot for the life of me figure out how to get the value of the selection from the lookup table. I can get the ...
0
votes
1answer
1k views

error “The object is used in the context different from the one associated with the object.” while assigning permissions to item in sub site

I am working on assigning permission groups to the list item which is in sub site level. the same code is working fine for top level site.but getting error at sub site level. function ...
0
votes
1answer
26 views

SP2013 and Powershell : Export mapping between SPContentDatabase and Sites to CSV

TL;DR : I'm trying to get all the SPSites (preferably only the URLs) contained by each SPContentDatabases mounted on each one of my WebApps into a csv. In the edit, I explain how I could break the ...
1
vote
2answers
975 views

Changing logo on all SharePoint Online site via PowerShell

Is it possible to create a script that will loop through all the sites in a site tenancy to replace the logo that is attached to each one. I'm unable to locate any useful commands in the SPO ...
2
votes
1answer
24 views

What WebTemplates are available for site designs in SharePoint Online?

Reading Microsoft Documentation for the command Add-SPOSiteDesign, I see three potential values of the WebTemplate parameter are 1 (team site not connected to group), 64 (team site), and 68 (...
0
votes
1answer
18 views

SharePoint Online modern site: Create Site column with multilingual Title using powershell

I can't figure-out how to create a site column with multilingual Title in SharePoint Online on modern sites using powershell. Example: I would like to create a column with the English Title "...
0
votes
1answer
16 views

How do I use Request-SPOUpgradeEvaluationSite command?

In Microsoft's documentation, I see the Request-SpoUpgradeEvaluationSite command listed. I have a few questions about this command. First of all, from what I understand this creates a copy of a site ...
0
votes
2answers
30 views

Pull SharePoint 2016 User profile information through Powershell

Looking for SharePoint 2016 powershell script to pull User profile information like No users profile, No of User properties , Last sync status etc.
0
votes
1answer
838 views

Can I retrieve SharePoint 2010 workflow steps with PowerShell

I can use powershell to get the names of all SharePoint Designer workflows in my farm - but is there a way to look at the steps of the workflow? Specifically, this farm has the iLoveSharePoint....
3
votes
1answer
914 views

Powershell CSOM folder.Files.Add(FileCreationInformation) Working earlier, Fails now?

Using Powershell and CSOM, on Sharepoint Online, I have successfully upoaded 300K pdf files w/metadata into folders in document libraries. Today, though, the same code is failing to Add files... ...
0
votes
1answer
22 views

Find users added to a site without a permissions group in SharePoint Site using PowerShell

I have been working on a SharePoint online system which involves the invitation of external users to give them access to specific site and its content. Access to the users are controlled by custom ...
7
votes
2answers
66k views

Powershell to list all sites and subsites in SharePoint Online

I know about "Get-SPWebApplication" but it's not available in Online. How can I get a list of all sites and subsites in SPO?
1
vote
1answer
15 views

Powershell CSOM with PnP AuthenticationManager: flush credentials

I've been using an OfficeDevPnp.Core.AuthenticationManager for a long time, in order to support MFA for PowerShell scripts targeting SharePoint Online with CSOM. For my current task, DEV is on tenant-...
0
votes
2answers
801 views

Update filed values based on conditions

i have document library in sharepoint 2010 and i want to update a field values based on some conditions . I need that every parentid has some documents and i want to update those prosessnos which ...
0
votes
1answer
935 views

Get size of a ListItem

I've been recently working a lot of scripting with Powershell 2.0 towards SharePoint 2010, tasked with building various scripts that would for example print some information about 10,000 lists, as a ...
0
votes
2answers
28 views

How To Retrieve all the List URL In SharePoint 2013

I want to get all the list URL from SharePoint 2013 using PowerShell CSOM. Some one could suggest on this?
0
votes
1answer
19 views

How to Cancel item level InProgress Workflow in SharePoint 2016 using CSOM

I want to cancel the In progress item level workflows in sharepoint 2016 using client side code in Powershell Or C# console app. Searched most of the links , But nothing is working. programmatically-...
1
vote
1answer
14 views

Setting style of Quick Launch Navigation with PowerShell

I have been searching for a while but did not find anything. How can I set the style of the quick launch navigation via PowerShell? I want to configure it from mega-menu to overlapping.
1
vote
1answer
980 views

How to delete calendar items from SharePoint online calendar list using PowerShell?

I have a SharePoint calendar having more than 35k items.The Calendar has data from 2011 and onwards. I would like to use PowerShell script to start removing items from 2011 to 2016 from the current ...
0
votes
2answers
33 views

SharePoint list access through PowerShell in SharePoint 2010

I am getting an error: Cannot index into a null array at line with "$Web.Lists" $web = Get-SPWeb -site "https://dTH.ca/sites/universal" $list = $web.Lists["Folder Files&...
1
vote
2answers
709 views

Powershell Script to approve all the pages,masterpages,layouts in a site collection

Need some automated way for publishing the content throughout the site within the one action using some commands, powershell or some custom code or any utility available for SharePoint 2013. Any ...
1
vote
1answer
777 views

SharePoint 2013 - Export site error

I have a problem by exporting a SharePoint Site by using Export-SPWeb on my SharePoint 2013 server. The error code is: Export-SPWeb: These columns don't currently have unique values. Is it ...
1
vote
0answers
19 views

How to read Assigned To column from SharePoint Workflow Tasks List using Powershell?

I am trying to fetch List details along with associated task columns to export into Excel using PowerShell. I am able to get all columns using following script except Assigned To column to show with ...

1
2 3 4 5
76