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)

3
votes
4answers
4k views

Remote Access to SharePoint Lists with PowerShell

I have a PowerShell script that pulls data from a database. I need to push this data to a SharePoint list on a different server. Would you have tutorial or examples that show how to do this (...
3
votes
2answers
8k views

Adding a WSP through the Management Shell?

I have a WSP that I am trying to install on my development SharePoint server. I used the Management Shell to do this: Add-SPSolution -LiteralPath c:\temp\mySolution.wsp and then: Install-...
3
votes
1answer
732 views

Pretty url in SharePoint

The url's on our intranet are pretty, i.e. http://intranet/test, but we want to show full path of the page, like this http://intranet/test/default.aspx I don't know why we get pretty url and have ...
3
votes
1answer
8k views

How to use CSOM/Powershell to update list item(s) in O365 from CSV

Not a programmer, but need to get a job done. Using Powershell and CSOM I've found examples and been able to import CSV into a list as new items. That is working. Here is a code snippet I'm using ...
3
votes
2answers
860 views

Powershell regular expression syntax for matching exactly 6 characters that start with two letters at end of url

I have been trying to get a regular expression right for the powershell match command. I am looping through all site collections in a web application (my sites have URLs SC followed by exactly 4 ...
3
votes
3answers
5k views

Make timerjob runs on specific server?

I have an already developed timer job that is running on front end servers, but I want to set it to run on application servers only. Can I do this with PowerShell without modifying any code of the ...
3
votes
3answers
7k views

What is a user friendly way to run Powershell scripts?

I've made several powershell script for my customers. They have very little knowledge about SharePoint and Powershell. I want to let them run these scripts when they want, but don't want them to ...
3
votes
2answers
2k views

PowerShell Scripts

Does anybody know if there's some way to delete items from an SPList using PowerShell scripting? If is this possible, has anybody any good tutorial? Thanks!!!
3
votes
1answer
4k views

Possible to set the default page layout for a site using Powershell?

I have a bunch of sites in which I would like to change the default Page Layout. Is there a way to set this to a custom Page Layout using powershell? (The page layout is already on all the sites) ...
3
votes
2answers
227 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 ...
3
votes
3answers
554 views

Get-SPUser without specify a site collection

I am going to migrate users with Move-SPUser. To do this, I am getting the user first: $user = Get-SPUser -Identity $adAccount -web https://sharepoint/site-collection The moving them: Move-SPUser –...
3
votes
2answers
3k views

Is there a way to create site pages and insert webpart into it via PowerShell?

We are creating a powershell script to create lists, groups and to install wsp packages. There are 5 wsp each containing 1 webpart. Is there any way via powershell to create 1 site page and embed 1 ...
3
votes
3answers
3k views

Powershell to install Farm solutions (wsp) [duplicate]

we are trying to deploy farm solution wsp file on the SharePoint server via PowerShell. The wsp is a webpart. I got this script by browsing forums... Foll. is our code:- $oUrl="http://mysite:9999/" ...
3
votes
1answer
3k views

Undo checkout with PowerShell

I'm trying to undo a checkout with PowerShell but the function name doesn't seem to be recognized. Here is the code that I used. $dList = [Microsoft.Sharepoint.SPDocumentLibrary]$list $...
3
votes
1answer
6k views

Need to change the owner of an existing SharePoint group using Powershell

I have succesfully been able to create a SharePoint group and assign it an owner. But now I noticed that it only works if the group has not been created. So now I need to add a way to modify the ...
3
votes
1answer
10k views

Powershell to List GUIDs of Lists and Libraries but how to seperate

Working on a script that will dump out all of the lists and libraries in a site, I found the script on Mike Smith's Blog: http://techtrainingnotes.blogspot.com/2011/06/finding-sharepoint-guids-using....
3
votes
1answer
2k views

change maxlength of an existing column in a list via powershell?

I have the following code to create a list, however I need to increase via powershell the maxlength of one column $spWeb = Get-SPWeb -Identity http://ost-dev1.ciredev1.local $listTemplate = [...
3
votes
1answer
2k views

How to authenticate when using powershell

I am trying to perform some tasks on user profiles and so, need to connect with different permissions using an account created for that. And, I am doing this with Powershell. Try { $site = Get-...
3
votes
5answers
4k views

Access Denied Retrieving Sites (Webs) Using PowerShell

My goal is to retrieve all the alerts for a given domain user, in SP 2007, then delete these alerts. I have referenced the following script on this site. In DEV environment, when I run the script I ...
3
votes
2answers
911 views

Updating relative links and images in wiki library

I have a wiki library which contents is automatically copied onto another site. Some of the pages in the library contain images, the links to those images are relative. Example: page: http://www....
3
votes
4answers
7k views

Restore-SPSite : Access Denied

Restore-SPSite : Access Denied You do not have permission to perform this action or access this resource. This is the error I get when trying to restore a Site Collection backup from the integrated ...
3
votes
3answers
4k views

Nulling/clearing/updating Managed Metadata TaxonomyFieldValue?

In my recent adventures populating Managed Metadata values (aka TaxonomyFieldValue), I have encountered either a bug, potential oversight, or a substantial erosion of my sanity. In short, it does not ...
3
votes
2answers
175 views

Move or copy a O365 SharePoint subsite

How do you move or copy a O365 SharePoint subsite and all of its children subsites in one site collection to another site collection? I have looked at using PowerShell but it does not seem possible ...
3
votes
3answers
43 views

How do I create a WebPartPage using PowerShell?

I need to learn a PS script to create a WebPart Page on any library I want in my Sharepoint 2010 site. Im brand new to PowerShell and Sharepoint, so far all I know is the little tought on a few MVAs I'...
3
votes
1answer
221 views

PowerShell Script to restart the Application Pools of WFEs

Need to create a PowerShell script to recycle the Application Pool of my WFE - Dev,Staging & Production servers of my SP 2013 Farm. I tried code mentioned here But somehow as mentioned in ...
3
votes
1answer
174 views

Update choice field SchemaXml using powershell

I want to change the choice field from drop down to MultiChoice. How to Update choice field SchemaXml using powershell. Also how to get SchemaXml property.
3
votes
1answer
355 views

Rename Term store (root) with powershell - managed metadata service

Is there a way to rename Term store "root" node? (yellow in the picture below) I've tried $taxonomySession = Get-SPTaxonomySession -Site $gurl $termStore = $taxonomySession.TermStores["Managed ...
3
votes
1answer
3k views

How to get SharePoint Online list url using Powershell?

I can retrieve a title $list.Title, but a title is not the same as url. In C# I can get list.DefaultViewUrl, which doesn't seem to be an option in Powershell. I found this solution with $List....
3
votes
3answers
2k views

How to get the active farm-scoped features in PowerShell?

If i want to get the Features that are activated on a WebApplication, i can use the SPWebApplication.Features property, which will return a SPFeatureCollection with the Features activated for the ...
3
votes
3answers
623 views

Slow CSV writing for huge document libraries in powershell

by using below PowerShell script, i get all the items list from the document library including sub folders hierarchy in a CSV file. This script works very fine for small data but for huge data like ...
3
votes
1answer
4k views

Unable to upgrade WSS_Search_ServerName database

I have got the following error in SharePoint 2010 Central Admin: The following databases require upgrade because their versions are older than the backwards compatible range: ...
3
votes
1answer
8k views

Uploading a file using powershell and updating column values

I am trying to upload a file from a local drive to a sharepoint doc lib, this much I have been able to find, however, I also want to update a column relative to the file, foe example, I have a company ...
3
votes
2answers
876 views

How to deploy all farm solutions in PowerShell?

Please tell me how to write a Powershell script that will deploy all added farm solutions.
3
votes
1answer
970 views

How to remove duplicate EventReceiver entries

Lately i had a bug that time-to-time added duplicate event receiver entries in SPEventReceiverDefinitionCollection. So how do i easily enumerate and remove these duplicate entries?
3
votes
3answers
3k views

How can I use Powershell to move a list from a development to a production Sharepoint 2010 box?

I'd like to copy a list (and its contents) onto our production server. I've been trying to use the Export-SPWeb cmdlet, using this article as a reference, but I can't seem to get it to cooperate. I've ...
3
votes
1answer
5k views

export / import spweb problem with DataConnectionLibrary feature

I'm attempting to export a subsite from staging to production using powershell and export-spweb and import-spweb. This worked just fine from staging to development. When we try to run this on ...
3
votes
1answer
42 views

Updating a UserCustomAction ScriptSrc

I'm trying to update a UserCustomAction that is set on a web. I am trying to update the ScriptSrc url of the action to include a query string parameter, ?rev=1, but it does not seem to be taking. ...
3
votes
1answer
287 views

how I can know if I have missing CU using “get-spproduct -local” command

I have SharePoint 2013 with build number = 15.0.4763.1000 which represents October 2015 CU. now we have installed the security updates for December 2015. but when I run the product configuration ...
3
votes
3answers
153 views

How to Archive a Site as a Sub Site

I'm having a tough time cracking this and need some assistance. Below is a site called TestSite, that is used to archive other sites not in use located at contoso.com/sites/Prong2/JRS/testsite/default....
3
votes
1answer
106 views

Set Default user when EnsureUser fails

I made the following Powershell script to check if a user exists in Sharepoint 2013: $siteCollUrl = "http://my-sharepoint-site" $spSourceWeb = Get-SPWeb $siteCollUrl; $test_user = "CONTOSO\...
3
votes
1answer
275 views

list all users in an office 365 site powershell csom

How can I list all the users from an office 365 account. I have tried this: $users = $Context.web.SiteUsers; $userinfos = $Context.web.SiteUserInfoList; $Context.Load($...
3
votes
1answer
97 views

Can I get overall click count for entire SP2013 farm?

We are using SP2013 on-premise standard. There are over 50 site collections. By checking each site collection's popularity trend we can see each site collection's click count. However it is too time ...
3
votes
1answer
431 views

Rename List with powershell SP2013

I know this is a really simple task and I have done it a thousand times and it worked every time, but I cannot rename a list via powershell anymore. $List = $web.Lists["mylist"] $List.Title = "...
3
votes
1answer
2k views

Add columns to existing libraries in SharePoint 2010 using Powershell

I need to add five new columns to existing SharePoint 2010 libraries using powershell. I am using below script: $ver = $host | select version if($Ver.version.major -gt 1) {$Host.Runspace....
3
votes
3answers
3k views

New-SPWeb : Cannot find an SPSite object that contains the following Id or Url:

While Running Following command: New-SPWeb -url "https://xyz.com/sites/" -name "apple" -template STS#0 I received following error: New-SPWeb : Cannot find an SPSite object that contains the ...
3
votes
1answer
2k views

SharePoint deployment - Deployed to: GAC (WebURL/Global) / BIN

I know that when we deploy farm solutions then they are available under Central Admin --> System Settings --> Manage farm solutions. In this list of solutions, there are 3 columns. Name, Status and ...
3
votes
1answer
3k views

using powershell script update the page name in sharepoint 2013

I wan to change the page name with Power shell script. When I had run the script I was given an spexception error: Exception calling "CheckOut" with "0" argument(s): "The URL 'en/articles/...
3
votes
2answers
3k views

Using PowerShell how do I change the column ordering for a SharePoint List

Been trying to search for the answer to this, what I need to do is re-order the fields of a SharePoint list and propagate that change down to 300+ sites (should have used a content type, but oh well) ...
3
votes
3answers
3k views

How to import term set with Use this Term Set for Site Navigation property selected using PowerShell?

$session = Get-SPTaxonomySession -Site $sitename $termStore = $session.TermStores[“Managed Metadata Application”] $group = $termstore.CreateGroup(“My New Group”) $group.Description = "My Term Group" $...
3
votes
1answer
2k views

How can I update a publishing page's page layout via PowerShell?

I have a few publishing pages that need a page layout change. The layout includes a Content Editor Web Part pointed to an html file in the site assets folder. The layout changes but the Web Part ...