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
151 views

How to set a powershell variable to a specific sharepoint page

I have a SharePoint 2010 documents library that contains about 50 .aspx pages. I want to break inheritance on about 6 pages and set them to specific permissions. I am able to get a page by numerical ...
1
vote
2answers
172 views

Applying link with varying image to SuiteBarBranding -element across the site collection

I've followed these instructions to change the default header of the SharePoint(2013)'s site. The code I used is this: $webApp = Get-SPWebApplication https://<intranet> $webApp....
2
votes
2answers
5k views

Is it possible to export/import a Sharepoint 2010 subsite?

Is there a way to import/export or backup/restore a sub site? I have a site collection at http://someurl.mycompany.com/sites/content. I have sub sites under that site collection that were created by ...
2
votes
3answers
1k views

Differentiate between custom timer jobs and system timer jobs

Is there a way to differentiate between custom timer jobs and system timer jobs. Under Central Administration - Monitoring - Job Definitions I see all the jobs defined on the farm. I´m new to this ...
0
votes
1answer
5k views

How to execute a script in SharePoint Management Shell?

PS C:\logfiles> dir Directory: C:\logfiles Mode LastWriteTime Length Name ---- ------------- ------ ---- -a--- 12/11/2013 2:54 PM 50707 ...
1
vote
1answer
144 views

How to AddItem with certain ContentTypeID using PowerShell

I am using PowerShell to add 100 items which need to be of a specific ContentType. (requirement) Test my custom events receiver using powershell. The test is to create a list with a custom content ...
5
votes
1answer
3k views

Powershell: Cannot update taxonomy type column item with multiple values

I'm having a strange problem. I try to populate items' property which is of managed metadata (taxonomy) type and the update method doesn't work. This field has "allow multiple values" property ...
2
votes
1answer
444 views

How to delete data from AuditData table that does not exist any more?

Our auditData table is growing and growing. I was able to delete some data using the powershell script: foreach ($site in get-spsite -Limit ALL) { $site.Audit.DeleteEntries("05/01/2013") ...
1
vote
1answer
536 views

how to get back old modified user name and date in Sharepoint 2010 document library?

Is is possible to revert sharepoint back with old modified user and modified date information? Even restoring version history changes modified user and date. For ex: my file in sharepoint 2010 ...
0
votes
2answers
4k views

Access Denied Add-SPSolution [duplicate]

I'm getting this error while adding solution to prod farm... a few weeks ago i found a website that gave me a line to write before launching any add command, but can't find it anymore Secondly, ...
2
votes
1answer
43 views

Copy of Test Phase to Production Phase

If you have two phase, test and production phase and test phase has a database with 40 table + 55 views + all cubes from analysis service. The production phase is a reflection of test phase. Is it ...
1
vote
2answers
177 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
94 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
781 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
107 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
63 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
488 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
248 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 ...
3
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
919 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
520 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
228 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
119 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
179 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
196 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
277 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
364 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
684 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
277 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
488 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
746 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
95 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
269 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
856 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
871 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
32k 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 ...