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 ...

learn more… | top users | synonyms (1)

1
vote
1answer
21 views

Query for spaces in values

I'm trying to filter a large list to pull out any values that have trailing or leading spaces using a powershell script. I can do it using a where-object command ($items| ? {$_["field"].StartsWith(' ...
1
vote
1answer
32 views

I am unable to edit a header on the Global/Top navigation bar

I am trying to edit a top navigation bar Heading's description so at the top ribbon I would have a its description at mouse hover. I am going to have to do it with powershell, as a script, because it ...
0
votes
0answers
47 views

PowerShell calling Sharepoint 2013 REST API to update list item

After attempting several different examples I am unable to update list items using the Sharepoint REST API. I receive back a 400 error from the request. The creplace is due to Sharepoint sending ...
1
vote
0answers
16 views

Can the SPFileCollection.Add method check if I file has changed?

I'm using the sharepoint powershell cmdlets to upload files to a document library like so: # Set the variables $WebURL = “http://portal.contoso.com/sites/stuff” $DocLibName = “Docs” $FilePath = ...
0
votes
1answer
37 views

Upload a document to a library with PowerShell

I have a standalone 2013 SharePoint installed on a Win2012R2 which I am playing with. When I click "Home" in the navigation this is my URL http://winsrv01/_layouts/15/start.aspx#/ I created a new ...
1
vote
1answer
32 views

How to delete taxonomy field?

I usually use SharePoint Manager 2013 in order to delete taxonomy fields, so I can delete the hidden note field along with it, i.e. a field called Organization and Organization_0. In my production ...
3
votes
2answers
59 views

SharePoint 2013 - Multiple domains in People picker

We have a farm that's setup on Domain A and it has trust to Domain B. By default we can find the users for Domain A in the People Picker, but we would like to add the users for Domain B as well in the ...
0
votes
1answer
42 views

PowerShell Script to assign Default Content (folders/files) to SP 2013 Document Set Content Type

I am using SharePoint 2013 on premises to build an application which utilizes a Document Set Content Type. I have used the GUI to: Create Site Columns for the website; Create a Document Set ...
0
votes
0answers
16 views

PowerShell Script - list of MySite (OneDrive) quota usage

I am looking for a PowerShell Script that can export a list of our SharePoint users with the information of used quota (Total Quota, Used, Free, ...in Megabytes). I have only found the scripts where ...
0
votes
0answers
86 views

Invoke-WebRequest : The remote server returned an error: (401) Unauthorized

I am getting below error while running below command for SharePoint url from powershell. Invoke-WebRequest -UseDefaultCredentials -Uri http://spurl Invoke-WebRequest : The remote server returned ...
0
votes
1answer
46 views

Using Get-SPSite -Filter

I seem to be having some trouble using the Filter parameter on the Get-SPSite cmdlet. Using this question for reference, I'd hoped to filter out the Site that I was getting, to later on exclude it ...
0
votes
0answers
46 views

How Can I copy Publishing Pages & Site Pages with WebParts to another site collection in SharePoint Online?

I am looking for a solution which can help me to copy Pages (Publishing, Site etc..) from one site collection to another site collection in SharePoint Online. To meet this requirement I have tried ...
1
vote
1answer
47 views

Resolve SPFieldUserValue by Email

We need to insert a bulk data from MS Excel into SharePoint lists. We committed this using Powershell. Almost everything straightforward, until we found a stoper with People columns. From Excel ...
0
votes
1answer
29 views

Import .cmp file to webapplication

I have exported my site with Central Admin to .cmp Now I use Import-spweb to import it to another webapplication like this : `Import-SPWeb http://srvdev:7070/Linstance/ -Path C:\Bak\Linstance.cmp ...
1
vote
1answer
31 views

Get the site owners information from a site collection

Can someone share the query to get Site owner and site collection manager information from all sites and sub-sites in a SharePoint 2013 site collection?
0
votes
2answers
41 views

SharePoint Online Management Shell - How to create sub sites

I am trying to automate the creation of multiple sub-sites in a site collection. Which command will do this? I am using SharePoint online 2013. The site collection is already created so now I'm ...
1
vote
2answers
81 views

SharePoint Responsive Package PNP tools not able to enable feature in Package

I am trying to implement Responsive UI Package for SharePoint on-premises (2013 and 2016) from this link ...
1
vote
1answer
69 views

Change the home page of a wiki library

I saved an old wiki library as a template w/ content and then created a wiki library from that template. The new wiki, however, shows all the wiki pages in a list of files because the new wiki home ...
0
votes
1answer
47 views

How to checkout file using PowerShell REST API in SharePoint Server 2013 located in subsite?

I'm trying to check out file which is located inside document library under sub site. Site URL : mymainsite/subsite/subsite/My Library/test.xlsx I'm using below PowerShell script function ...
1
vote
2answers
68 views

List installed products & components using powershell

i came across a situation i want to mount a content database in a new environment that i don't know what was installed previously there. Using powershell how i know what installations installed in ...
0
votes
0answers
23 views

Connect to a SharePoint 2010 site having SSO authentication using Powershell

I am trying to connect to a SharePoint Site having an SSO authentication using PowerShell. But i am unable to do so. Please note, I am trying it from an external server so i have to do it using ...
1
vote
0answers
52 views

Add WebPart to Page with PowerShell

So I have the following code that I took from "http://adicodes.com/adding-web-part-to-page-with-powershell/". It works fine, until the $context.ExecuteQuery() in the AddWebPartToPage function, where ...
1
vote
1answer
32 views

Go through specific library and set all subfolders as well as the root folders content type using powershell - Stuck

What I am trying to do is access a SharePoint 2010 document library, change all root and sub folders of that library from their existing content type to a new content type. So far my code has somewhat ...
1
vote
2answers
65 views

How to get specific sub sites Using Get-SPWeb object

In the code below i only want to get following 3 specific subsites using Get-SPWeb Object. which filter command is most appropriate to target only these 3 sites 1. ...
1
vote
1answer
45 views

Update more than 5000 Items in a list using PowerShell in SharePoint 2013

I need to write a PowerShell script to update a choice column with a specific value in all the items of a List. Following is the main part of the script $siteUrl = "http://mySharePointSiteUrl/" ...
1
vote
0answers
52 views

Reading Each XML Node in Powershell to create list in SharePoint

I have an XML file which I got from running webservices of below format. It contains each List name in the site collection under node. Now using this file I have to create lists in another site ...
1
vote
1answer
40 views

Cannot uninstall the LanguagePack 0 because it is not deployed

I'm trying to run the following PS command on a SharePoint 2010 Foundation Farm: Update-SPSolution -Identity testwebpart.wsp -LiteralPath ...
1
vote
1answer
13 views

Auto drop value everyday

So I have created a list that has a field that allows a user to input a rating of 1 - 4 which is then linked to another list that totals up each rating for that specific user. What I need to do is ...
2
votes
1answer
31 views

Error when using the UsageReportWithCSOM Script

Just using your script to grab the OD4B usage details, when running the script I'm receiving below error each time it queries someone's URL. Any ideas? I'm running the script as an O365 Global Admin. ...
1
vote
2answers
46 views

How can you change a rootweb name, url etc?

How can I change the name on a root web? Right now it's http://dev1/sites/dog. I am trying to change it to http://dev1/sites/cat I have tried $web = get-spweb http://dev1/sites/dog $web.Name = ...
1
vote
1answer
214 views

Import-SPWeb : The DateTime represented by the string is out of range?

I am trying to import an exported sub site which exists in a separate site collection to another site collection that is hosted by different web application. I'm running the import command like this: ...
1
vote
2answers
38 views

Set number of decimal places - PowerShell

So I'm building up a PowerShell script, and I wish to set the number of decimal places on a "Number" column. However, I can't seem to find the property necessary to do so. According to MSDN is should ...
1
vote
2answers
29 views

How to delete files from “Manage files which have no checked in version” using powershell

I tried to delete custom content type from Pages library but got an exception "content type is still in use". The I get to know that files should also be deleted from "Manage files which have no ...
0
votes
1answer
30 views

How to prevent Poweshell not showing script processing data

I have created a powrshell script for updating SharePoint List. When i run it shows all the backend processing to the console for example all the list schema info. I want it only show script created ...
0
votes
0answers
17 views

SharePoint Online PowerShell Custom Group in Site Settings

I know how to use PowerShell to create a new SharePoint Site Settings link, but I cannot seem to find how to create a custom group within site settings. Here is the code for creating the Custom ...
2
votes
1answer
62 views

How to set ModerationInformation.Status Values in Powershell?

I have saved $item.ModerationInformation.Status information in HashTable $DeletedItemsIDs and recycled list items. After That I restored items from recycle bin and assign saved ModerationStatus ...
0
votes
1answer
18 views

Maintaining Approval status after restoring list items from recycle bin

I have recycled list items using powershell method $deletedGuid = $item.recycle(). After recycling, I have restored items from recycle bin again using poershell method ...
0
votes
0answers
25 views

WarmUp script that handles ajax / rest request - System.Net.WebClient

It seams that my warmup script does not work as expected. In my personal.aspx (mysite) we got several ajax /rest request that list several user data (lists, user properties, etc) that runs on ...
0
votes
1answer
32 views

Is there a Transaction Scope when PowerShell scripting in SharePoint?

I've seen that there are transaction scope tools in PowerShell for working with the registry. But, I also understand that PowerShell providers have to specifically be set up to use transactions. ...
0
votes
1answer
39 views

Powershell script to get count of how many files are in a folder and its subfolders

As the title suggested does anyone know of a powershell script or any other way of getting the count of how many files are within a folder and its subfolders within a library? I have tried to look ...
0
votes
1answer
32 views

Using powershell how to get active features and custom features also in a sharepoint farm

How to get all out of the box active features and custom farm solutions features using powershell code in sharepoint 2010 and sharepoint 2013.
0
votes
1answer
46 views

How to get the timer job name from timer job id in sharepoint 2010

how to get the timer job name from a given timerjob id in sharepoint 2010 server farm. ex: i have a timer job id Get-SPTimerJob | Where {$_.id -eq "xxxxxxxx3"} | ft id,name it displaying empty ...
1
vote
1answer
56 views

Error while Overwrite CheckIn using Powershell

I got following error when I tried to Checkin files wich are Checked out by other users using powershell. Exception calling "CheckIn" with "2" argument(s): "You cannot checkin and overwrite a ...
4
votes
2answers
58 views

Export-SPWeb List with spaces in list name

I am trying to backup a list and am getting the error Export-SPWeb : Cannot find an SPWeb object with Id or Url . I'm guessing this is related to the space in the list name. I've tried this ...
0
votes
1answer
36 views

SPCheckinType.OverwriteCheckIn in Poweshell

How we can OverwriteCheckIn in Powershell? Please correct second parameter? $ListItems[$i].File.CheckIn("Checkin automatically",SPCheckinType.OverwriteCheckIn) // second parameter seems wrong
1
vote
0answers
46 views

Error in Powershell with .recycle() method

With the following code, I am getting this error in powershell: I could not find out whats wrong here? I am using recycle() method because in next step, i need to restore items from recycle bin. ...
2
votes
2answers
32 views

How to specify start method in Powershell

I have written a powershell script with couple of methods. I want to start powershell script with some specific method,for example the script should start with method Get-SitesWithNewsPageCT() How I ...
1
vote
1answer
25 views

How to get current Web object from collection

In the code below, I want to pass current web object to function Remove-CT(), How I do that? site | Get-SPWeb -Limit all | ForEach-Object { $currentWeb = $_.SPWeb // please correct this line if ...
2
votes
1answer
74 views

Do we have Secondary SiteCollection Administrator in SharePoint Online?

Do we have Secondary SiteCollection Administrator in SharePoint Online site? Because when I create new Site Collection, I don't see Secondary administrator listed in the form. Also in other posts ...
0
votes
1answer
22 views

User profile service issues

I had this question earlier but did not find any solution. My user profile service synchronization is not starting. I tried stopping the service and restarted it also but no luck. Is deleting the user ...