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
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
2k 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
5k 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: ...
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 = ...
3
votes
5answers
3k 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
890 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: ...
3
votes
4answers
6k 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
3answers
37 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 ...
3
votes
1answer
133 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
125 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
302 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
2k 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 ...
3
votes
3answers
5k views

What is the best practice to duplicate a site collection?

I have a site collection, that contains sub-sites and other list that have different level permissions. If I use the "Save as template" I don't obtain a satisfied result, because template loses the ...
3
votes
3answers
569 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
3k 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
7k 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
855 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
943 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
247 views

How to check which value was used for WorkflowHostUri with Register-SPWorkflowService?

I have a production environment with three Workflow Manager 1.0 servers in a farm. We also have a virtual URL that is used by NLB to spread the load between these servers. Register-SPWorkflowService ...
3
votes
3answers
90 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 ...
3
votes
1answer
66 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 = ...
3
votes
1answer
219 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; ...
3
votes
1answer
66 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
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) ...
3
votes
2answers
2k views

Exception calling “ExecuteQuery” with “0” argument(s): "The remote server returned an error: (400) Bad Request. CSOM SP13

I'm trying to add a page to my search centre in sharepoint 2013. Trying out cSOM too. Here is my code, I am getting a bug Exception calling "ExecuteQuery" with "0" argument(s): "The remote server ...
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
1k 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
2k 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 ...
3
votes
3answers
14k views

Export all the columns from Sharepoint list via Powershell

While exporting the data from Sharepoint via Powershell into a txt/csv file, I started to think, is there a way to choose all of the columns than writing all of the columns down to the code? because ...
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 ...
3
votes
1answer
6k views

how to Update/Add list items via New-WebServiceProxy in powershell?

Over View:   I’m trying to automate updates to a SharePoint list using PowerShell via the Web service object.   The end goal is to remove items all from the list, then import new data via a csv file. ...
3
votes
1answer
314 views

Enumerating Features in a WSP or Deployed Solution using PowerShell

I am creating a build script that will automatically create a Test Site, Deploy all wsp to that site and activate all the features. The problem I have is how do I enumerate the feature Names or GUID's ...
3
votes
2answers
4k views

Sharepoint Master Page Powershell

We have over 80 Site Collections in our Web Application is there a way through power shell that i can set the same master page for all the site collections.
3
votes
2answers
4k views

Can I edit a publishing page using Powershell?

I have a bunch (technical term) of publishing pages within a single subsite of my site collection that contain a broken link. I'm wonder if it's at all possible to use Powershell to perform a 'global' ...
3
votes
1answer
1k views

System.ArgumentNullException on feature enabling

I created a vs solution with site columns content type list template list instance. It compiles, it installs correctly, except when I click on activate I got the exception on the ULS logs: ...
3
votes
1answer
1k views

I am trying to rename a site using Set-SPSite command

I have created several host-named site collections and now I have to rename a couple. I used the command New-SPSite to create 'http://test1.domain.com' and was able to get everything going fine, but ...
3
votes
1answer
4k views

PowerShell Script to execute a console application

Can you please let me know how to run an exe or console application through a powershell script in SharePoint 2010.
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
2answers
33 views

how to create two webapplication with the same Port on IIS

is it possible to create two webapplication with the same Port on IIS in PowerShell. I belive it's not extending webapplication. Each Webapplication has her own content data base. Any idea doing that ...
3
votes
1answer
30 views

Two Web Apps. Two root site collections on them. HOW?

I've spend half a day. I have web application http://one on port 80 and site collection on it. I create second web application with separated site, http://two on port 80(url is added in A-records). ...
3
votes
1answer
164 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
1answer
104 views

How to retrieve workflows in powershell?

I'm trying to write a script to check the status of workflows in a list. I have tried a couple different ways but I never get anything to return. foreach($item in $list.Items){ $item.Workflows ...
3
votes
1answer
49 views

How can I remove all documents from a SharePoint 2010 Web Application

We would like to restore our entire production environment in our stage environment. After completing the restore, we would like to strip out all the documents to just leave the "structure" behind. ...
3
votes
1answer
297 views

Get item by DocID using PowerShell

Has anybody retrieved items by their DocId using powershell. Specifically the ID generated by the DocID service. I'm looking to get details of items based on a (large) list of DOCIDs. I guess I could ...