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
2answers
183 views

what is best practice for automating site structure creation?

I'm working on creating a website in SharePoint. I need a way to automate what I have done until now. For example I have created a web application and two site collections and bla bla. Now I have two ...
1
vote
1answer
96 views

Is it possible to make the sp group names localizable when created using powershell

I have been able to create a powershell script that creates sharepoint groups per site collection. But I need to create this groups in 2 different languages. my question is, is it possible to make ...
3
votes
2answers
805 views

is it possible to compare environments?

I'm trying to find a tool or a PowerShell script which allow me to compare 2 environments, my goal is to compare my production farm and my pre prod farm and to compare as many settings as possible, ...
0
votes
1answer
109 views

Different results from Command Line and Script

If I run Get-SPWebApplication -IncludeCentralAdministration | Get-SPSite | Get-SPWeb I get back a list of all web sites including Central Administration. If I put this line in a script and run this ...
2
votes
1answer
65 views

Retrieve Custom Workflows Info

Via SharePoint Designer it's possible to verify all Site Collection Workflows (on the Workflows List) grouped by type. How can I via Powershell retrieve all that info displayed in the SPD Workflows ...
2
votes
0answers
99 views

Is it possible to read the contents of deleted folders in the RecyclingBin?

I've been playing around with scripts that read deleted files from the recycling bin such as the one below but I can't figure out how to read the files within a deleted folder without restoring it ...
0
votes
3answers
495 views

Create a document library from custom list definition with powershell

I have a question regarding the creating a Document Library based on the custom list definition, how can I do that using the PowerShell. Thanks
1
vote
2answers
249 views

Editing CreatedDate on a publishing page using powershell

I am trying to move some publishing pages from an old SharePoint server to a new one using powershell. When I try to update the createdDate it says the property is read only. Is there a way to change ...
1
vote
2answers
105 views

configure claims authentication in Sharepoint Which has configurd in 2 different servers

I am trying to implement claims based authentication in SharePoint which is configured in 2 different servers, previously it was in one server and it worked fine with a custom STS(.net mvc application)...
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 ...
4
votes
3answers
16k 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
932 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")) {...
1
vote
1answer
526 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
233 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
121 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
180 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 = Get-...
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
201 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
283 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
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 : <nativehr>...
1
vote
2answers
369 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
59 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
700 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 = Get-...
0
votes
2answers
288 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
76 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
493 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
747 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
96 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
270 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
882 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
1k 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
888 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
33k 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
545 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
469 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
846 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
209 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
636 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 Microsoft.SharePoint....
2
votes
3answers
651 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
155 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
149 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
6k 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 ...