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)

0
votes
1answer
2k views

Upload file to SharePoint Document library using powershell

I want to upload the same file to multiple site collection with the same hierarchy in all the site collection using powershell and the with functionality auto checkin/checkout. I have able to upload ...
3
votes
3answers
15k 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 ...
2
votes
1answer
1k views

How to check user has visited site collection first time?

I want to know which users have visited the site first time from the added users. For ex, I have added 40 users in the sharepoint but only 10 users have logged in and 30 have never logged in the site. ...
1
vote
1answer
848 views

Powershell to add users to custom security groups - getting 0x80070005 error

The following powershell reads an xml file and adds users to custom SharePoint security groups. If ([bool](([System.Security.Principal.WindowsIdentity]::GetCurrent()).groups -match "S-1-5-32-544")) ...
0
votes
1answer
500 views

Error while creating search center (Powershell)

I try to create a new search center (as a subsite of a subweb) with powershell When I do this, I get an error: New-SPWeb : Provisioning did not succeed. Details: Failed to initialize some site ...
-1
votes
2answers
222 views

3rd party tool to minimize the manual effort - SharePoint 2010?

We would like to setup a tool to help us on the below listed activities and dont expect any additional features, the tool should be cost effective as we have 2wfes with less than 4k users. Manage ...
0
votes
1answer
114 views

How to send files from Shared Folder to SharePoint Library

We have a ticket system on the network that creates documents in a shared folder (Different computer on our network). Is there some way I could create a script to take files from the folder and add ...
0
votes
1answer
169 views

Set work e-mail address to SharePoint Group

Looking at the SharePoint groups in my site, I see there's a column work e-mail. How does this work? Is it possible to set a work e-mail to a SharePoint group? Maybe through Powershell? Basically, ...
2
votes
1answer
3k views

PowerShell script that deleted quicklaunch entries

I'm running a PowerShell script that deletes about 10 entries per minute. Is there a way to do this more efficiently/quicker, i.e. directly from the database? How can this be achieved? $web = ...
1
vote
1answer
5k views

Setting “Chrome Type” to “None” for a web part using power shell

I have added a custom web part on page. Some how I am not been able to change its Chrome Type to None because when I mouse over the corner of web part where the arrow is supposed to show under ...
1
vote
2answers
184 views

Should I dispose SPWeb objects created using SPWebPipeBind?

I often write PowerShell script that rely on SPWebPipeBind object: param( [Parameter(Mandatory=$true, Position=0, ValueFromPipeLine=$true)] [Microsoft.SharePoint.PowerShell.SPWebPipeBind]$Web ...
2
votes
1answer
260 views

Most effiecient method of checking/veryfing identical/missing content between 2007 and 2010?

We are currently migrating from sharepoint 2007 to 2010 on a dozen servers, due to technical reasons we cannot employ the usual methods and instead we are using the webservices and requests to ...
1
vote
3answers
2k 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
351 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
640 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
260 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
469 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
257 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
805 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
981 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
836 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
30k 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
521 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
430 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
802 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
193 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
595 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
611 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
145 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
143 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
559 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
147 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
698 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
410 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
691 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
433 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
271 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
151 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 ...