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
3answers
3k views

Powershell How to unlock all sitecollections

I am trying to build a Powershell Script, which iterates over all SiteCollections and checks if they are on lockdown. This is because, sometimes some collections don't come back from read-only, after ...
4
votes
5answers
10k views

I cant delete or restore a site collection or repair database

When I try to do a restore of a site collection, restore-spsite -Identity https://xx/10014628/ -Path D:\SiteCollectionBackups\10014628.bak -Force -Confirm I get: restore-spsite : ...
1
vote
2answers
353 views

Powershell and accessing Audiences

I'm trying to build a fully functioning powershell script that will merge user accounts, loop through all the site collections and delete the 2 user accounts, then execute audience compilation. I've ...
1
vote
2answers
58 views

Upgrading PowerShell to 3.0 [closed]

I've just installed PowerShell 3.0 (KB2506143 - Windows Management Framework 3.0) on my SharePoint 2010 Web server (Windows Server 2008 R2 SP1). When I checked version with PowerShell using ...
2
votes
2answers
658 views

Error in calling SystemUpdate

I have the following PowerShell script which will update the TemplateUrl field for all forms in a form library. $newTemplateUrl = "http://SPSERVER/FormServerTemplates/NewFormTemplate.xsn" $web = ...
0
votes
2answers
267 views

Managed Properties Backup/Restore

I have a tool called the Documentation Toolkit which allows me to see the difference between farm settings. I found some differences between my PROD and QA environments were the managed properties, ...
4
votes
2answers
75 views

Status Script in PowerShell

As a newly SharePoint supporter, I find it difficult to get overview for my company's customers SharePoint Server; e.g. installation, setup, topology. Is there a PowerShell script which can provide ...
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 ...
1
vote
2answers
3k views

Read XML with PowerShell [closed]

Here’s what I am trying to do. There is an XML file in the “forms” folder of each our SharePoint libraries called “client_LocationBasedDefaults.html” The file contains the column defaults that can be ...
1
vote
1answer
479 views

Central admin no longer available, asks to set up new farm

I have a development Sharepoint 2010 enterprise edition. My account has full control and SPShellAdmin credentials on the SQL database farms. Last spring I developed some custom web parts for my ...
0
votes
1answer
744 views

Powershell and site collection

How to create default site collection if After sharepoint installation sharepoint default site collection does not exist using powershell script. I need this because at time of activation of extenal ...
0
votes
1answer
93 views

PowerShell and SharePoint Search

Using PowerShell I want to check Searchable,Retrievable,Queryable property under Business Data. How can I do that in Search Schema?
1
vote
1answer
266 views

How do I modify the elements.xml for the default.aspx page using powershell or C#?

On SharePoint 2010, I have a site template solution created by saving a site as a template. Recently I modified the template in Visual Studio - I needed to change the markup for several ...
0
votes
2answers
819 views

Creating a WebApp via PowerShell is mapping the site to wrong AppPool

I have a weird issue with creating WebApps using the below script. Seemingly when I create my WebApp everything is working and looking fine. I can look in IIS and see that it is correctly configured, ...
2
votes
1answer
1k views

How to Remove termset using powershell script

I want to remove a Termset that contains several terms. How do I accomplish this?
1
vote
1answer
994 views

How to get all pages from a site collection with a specific criteria with powershell

I have the following code and it seems it works fine, but it only returns things from the root site. We have like 200 subsites, and the script should return all pages where the contacts field on the ...
1
vote
1answer
848 views

Import-SPWeb Issue

I’m trying to move a subsite in another site collection. I follow this article: http://www.codeproject.com/Articles/356985/Moving-a-Sharepoint-Sub-Site-to-its-own-Site-Colle Export works fine, but ...
8
votes
2answers
31k views

Powershell script to find permissions for a specific user

what am i doing wrong user.ps1 $user = "sp2010\systemsacct" $site = $gc | Get-SPSite sp2010 $site | Get-SPWeb -Limit All | Get-SPUserEffectivePermissions $user Out-GridView -Title "Web ...
1
vote
2answers
529 views

Copying permission levels in SharePoint 2010?

As a SharePoint support team, most of our efforts goes in giving/revoking/listing the permission. We would like to reduce the manual effort, I know Axceler is one of tool which greatly helps in ...
3
votes
2answers
448 views

Identify Started Service App by Powershell

I am using the following Powershell script in hopes of identifying Started service applications by server. Spot checking the results shows something unexpected. For instance, I know Lotus Notes ...
1
vote
2answers
814 views

Solution “Not deployed” yet actions are successful

I have an odd problem with a farm where solutions are marked as "Not deployed" yet looking at the last operation it shows "Deployed Successfully" and lists all the servers as being successfully ...
1
vote
0answers
1k views

Mass update metadata in all items (files and folders) in a document library

This is my first question here, so apologies if it is a duplicate. I'm trying to write PowerShell code to mass-update a managed metadata property, doing something like this: $query = New-Object ...
1
vote
0answers
195 views

Remove Content Type Hub URL

I used a Powershell script to add the URL for the Content Type hub, as in the picture below. Now I wish to remove this URL. Not replace it, but remove it altogether using PowerShell. Is this ...
0
votes
1answer
601 views

Postbuild event with PowerShell 3 script does not works

In a SharePoint 2010 project, using VS 2012, I set up a post build event: "%WINDIR%\SysNative\WindowsPowerShell\v1.0\powershell.exe" -version 2 -command "& {Add-PSSnapin ...
2
votes
2answers
623 views

EnsureSiteAssetsLibrary throwing exception

The short story, when trying to execute SPListCollection.EnsureSiteAssetsLibrary I get: Exception calling "EnsureSiteAssetsLibrary" with "0" argument(s): "A list, survey, discussion board, or ...
0
votes
1answer
148 views

create new-spweb using given password and username in powershell

i want to create a new sub site using power shell but by a given user as in context, how can i do this. I am using New-SPWeb Cmdlet.
1
vote
1answer
2k views

powershell iterate over all global navigation urls and change them from absolute urls to relative urls

I made a backup restore of some site collcetions from production to dev environment. Then I noticed that sometimes when I clicked on the global navigation items on my dev, they were pointing to ...
2
votes
0answers
144 views

How to assign the metadata for folders and sub folders

I am migrating the SharedFolders and files from Windows to SharePoint Library. So here i am able to add metadata for only files, but not for folders. Here the below is the code i tried for adding ...
3
votes
1answer
5k views

PowerShell - Save output to a text file with dd-mm-yyyy added to the name of the file

The below script will run daily, task schedule, need help in saving the output to a text file e.g. something like SPContentDatabaseStatus_17-10-2013.txt and saved in a folder named Reports. Running ...
0
votes
4answers
564 views

GUI tool For PowerShell

Goal: User PowerShell in a user-friendly approach Problem: I have seen PowerShell using for MS-dos but there is not tool such as Visual studio as PowerShell? Any softeware with GUI for PowerShell ...
1
vote
1answer
150 views

Create GUI to run sp-commands using c#

I have a requirement to create a GUI that talks with sharepoint management shell and gives the output then and there. i tried the solution given here ...
0
votes
1answer
716 views

Hide specific Site Template from SP2010 Site creation list using Powershell or Stsadm

I have some custom site templates.. Now i want to just hide those templates from the Site Creation List.. I found some ways to like editing webtemp.xml and doing it from UI for each site collection.. ...
1
vote
1answer
419 views

People picker not able to fetch one user

I am trying to fetch user in people picker. However, in the Production Environment it is failing to resolve one of the user in few of the sitecollection. When I try to get the same user in other ...
1
vote
1answer
702 views

Packaging and Deploying page layouts with VS and Management Shell

I have created a .wsp file through Visual Studio which should contain a module with my page layouts I want to deploy. To do this I downloaded my page layout .aspx that was already created on my ...
1
vote
2answers
457 views

Remove SecondaryOwner from site collection with powershell?

Does anyone know how to remove the secondary owner of a site collection with the help of powershell? I know how to set the SecondaryOwnerAlias with the help of powershell but so far I did not find ...
0
votes
2answers
158 views

SPCopyDestinationCollection.Add() Method Does Not Persist to the Database

I'm attempting to run a basic PowerShell script to fix a lot of broken "Send To" destination links that resulted from a site migration from one farm to another. I wanted to proof-of-concept this on ...
1
vote
1answer
277 views

How can I load PowerShell 2 PSCX modules on a SharePoint Server that has PowerShell v3 installed?

My current environment of SharePoint 2010 Enterprise Server is having some of the servers updated to support PowerShell v3. At the moment we utilize PowerShell to manage some of the SharePoint Server ...
1
vote
1answer
156 views

Importing CSV with HTML markup in some values using PowerShell

I have a CSV file where some of the values contain decoded HTML markups (e.g. <b%gt;Example</b%gt;) that I try to insert in a SharePoint list. When I iterate through the values using ...
0
votes
2answers
2k views

Upload Site Template (.stp) as Farm solution using powershell

I have custom site template file which i got from the SP2007 site as .stp file.. CustomTemplate.stp What i need to do is Deploy this site template to SharePoint 2010 Farm.. I know i can do it from ...
0
votes
3answers
316 views

The way to modify the content of wp on all pages

I have a question, basically I have a SharePoint 2007, and I have some particular pages a cross the portal which contain a Content Editor Webpart. I would like to be able to modify this CEWP, by ...
1
vote
1answer
2k views

SP 2010 Timer JOB not appearing in the Timer Job definitions under CA

I'm having a issue with One of my custom develop timer Jobs on SP2010 Farm.? Timer Job is not appearing in the Timer Job definitions under CA , Operations Tab This timer Job is target scope on web ...
0
votes
1answer
5k views

Deploy a single feature using SharePoint Management Shell with SharePoint 2013

I have been working in a development environment and deploying my custom web part features from Visual Studio directly by just hitting F5. I now need a way to deploy features separately to a test ...
2
votes
2answers
610 views

SPImport Error: An event receiver has canceled the request

im running below Powershell Import CMD to import a site import-spweb "URL" -Path "E:\" -updateVersions Overwrite -includeusersecurity -nofilecompression -Force and this gets below error ....... ...
0
votes
2answers
2k views

Set group owner using Powershell

I use this command: Set-SPOSiteGroup -Site htt.....com -Identity newgroup -Owner newgroup2 (newgroup is a Sharepoint group, newgroup2 is another sharepoint group) Powershell responds with this: ...
0
votes
1answer
355 views

Using Content Enrichment without developing a custom WCF Web Service?

Reading the article How to: Use the Content Enrichment web service callout for SharePoint Server it looks like I need to develop my own WCF Web Service to use the Content Enrichment. The list of ...
1
vote
4answers
6k views

How do you apply a theme with powershell in 2013?

I'm writing a powershell script that creates a number of site collections. I want to programmatically set the composed look to "Sea Monster". Through the web UI I go to Site Settings > "Change the ...
0
votes
2answers
35 views

Full deploy with customization

I have installed 2 VM's (DC/SQL box and a SP2010app/VS2012 box). I have created a web app with its initial root site collection (based on Blank Site). My goal is to prepare the dev environment so ...
1
vote
1answer
1k views

Working with taxonomies via PowerShell: Removing a tag from an item

So I have a term store created and populated with terms, and I'm writing a script to retroactively tag items. During preliminary poking around, I found I can successfully tag an item with simply ...
1
vote
2answers
2k views

Document Set Move

So far I have managed to move Document Sets using PowerShell from Document Library A to Document Library B. I found this article: ...
5
votes
2answers
6k views

Is it possible to change an existing list's URL?

Is it possible to change a list's URL from something like /site/Lists/ListName to /site/ListName in SharePoint 2010?