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)

4
votes
1answer
572 views

Powershell scripts: Create user profile synchronization service using sharepoint active directory

In sharepoint 2013 I have to create user profile synchronization connection using sharepoint active directory through scripts. I have created the user profile service using powershell after that is ...
1
vote
1answer
630 views

How to use Power Shell cmdlets with batch file?

I have bit interesting requirements. My client want to develop the Sharepoint 2010 administration UI from Java application. So I suggest him to user Sharepoint web services. As we all know its good to ...
2
votes
1answer
188 views

Warm-Up Script not writing to log file

I have been working on implementing the warm-up script from Ingo Karstein Warm-Up Script The script runs without any issues, but the log file (.txt) is not being generated as expected. I have the ...
2
votes
1answer
2k views

How to import a library from Export-SPWeb outputs?

I am trying to understand how to restore an arbitrary library to an arbitrary site in an arbitary site collection - inspired by some future user announcing he accidentally deleted a document from the ...
1
vote
2answers
412 views

PowerShell cleaner script work badly after New Year?

I have strange situation with PowerShell script which delete older Backup Files in SharePoint Backup Folder. I use two PowerShell script, first make Backup Farm and second check Folder with Backup and ...
5
votes
1answer
638 views

What update I have to install in Foundation 2010 to run a backup that asks for version 4.1.13.0?

I'm trying to run a backup from a Sharepoint Server 2010 that runs a version 14.0.6101.5008: The version of my local Sharepoint Foundation 2010 server is 14.0.6114.5000: When I run the backup ...
3
votes
1answer
6k 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
120 views

Hide SPContenType in use

I'm trying to hide (or remove it from the new button drop) a SPContentType that is already in use via Powershell scripting. Even if before: $SPContentType.Hidden = $true $SPContentType.Update() I ...
2
votes
1answer
2k views

Users cannot open workflow task (custom form) - Unexpected exception

I have created a custom approval task form for an approval workflow. It works fine for me as a site collection administrator, but for normal users (the users getting the task) there is an error ...
4
votes
1answer
116 views

Application DLL replaced sometimes in 14 Hives feature folder

I deploy Infopath forms using powershell script. After deployment, dlls of my deployed application appears in 14 hives/feature/guidfeaturefolder After some modifications when i deploy again the same ...
16
votes
5answers
27k views

Suddenly getting “The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered.”

This morning all the development machines at the company I work at, couldn't manage SharePoint through Powershell. We were all getting the annoying "The local farm is not accessible. Cmdlets with ...
1
vote
1answer
202 views

Creating document sets from a spreadsheet

I have a list of offices that I need to create document sets for using a custom document set content type. Anyone have any idea how to create a Powershell script to read the spreadsheet and create the ...
1
vote
1answer
597 views

Creating SiteCollections using SharePoint Management Shell 2013

I am following the below instruction to create a NHSC, but at point D when I am creating a Team Site, I get the message that the new URL is not found! Do I need to create that before? Am I missing ...
3
votes
1answer
4k views

creating site collections using SharePoint management shell 2013

I am creating Site Collections for Testing SharePoint. I am using Host Named Site Collection to do that instead of the path based site collection addressing. For that Got a reference to the HNSC ...
1
vote
1answer
696 views

Set-SPUser not adding SPUser

Adding a user trough the following PS command line works just fine: Set-SPUser -Identity "Domain\LoginName" -Web $Web.Url -Group "GroupName" The problem occurs when the user is deleted and then the ...
3
votes
1answer
355 views

Add Administrator to User Profile Server via Powershell

I was recently directed to an article that explains how to add a user to the permissions list for the User Profile Service using Powershell, which worked a treat. [My original question] I'm now ...
1
vote
1answer
389 views

Search returning double results?

When a user searches on "http://intranet" with "All Sites", the user gets double results and the links are pointing to the same exact location/file/path. When the user searches on "http://intranet" ...
1
vote
1answer
384 views

How do I add a lot of contenttype aliases to a new Content Organizer Rule using Powershell?

NOTE! This post is about adding MANY, BUT NOT ALL content types to your rule. If you simply need to create a rule for ALL content types, go straight to the bottom of this post. I'm creating a ...
0
votes
2answers
255 views

How to move lot of files to document library from a folder

We are looking at moving files of about 350gb of files to sharepoint. What would be the ideal tool to use.Will powershell do the job? Thanks in Advance Cheers
3
votes
1answer
537 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 ...
0
votes
1answer
51 views

User based document library

I have a request regarding document library, basically the library will store each person's record, so the security is at user level. Instead of using mysite, I am now having two choices in my head: ...
1
vote
0answers
682 views

Export the Web Analytics in SharePoint 2010 using Powershel

Is there any way to export the Web Analytics in SharePoint 2010 using Powershell? The following link shows an example of the data I would like to retrieve, both on (Web collection and site ...
0
votes
1answer
526 views

How can I update pages that live in a specific folder?

Via PowerShell, I would like to edit the page layout of all the publishing pages that live within a specific folder (or any subfolders of that folder) in the Pages library. I found this script that ...
1
vote
1answer
651 views

How to create a PowerShell script that accepts one or more SPWebApplication and use it in an expression?

I'm trying to create a custom function that can uninstall and reinstall any SharePoint solution. Some solutions requires the -GACDeployment switch, some requires the -AllWebApplications and some ...
0
votes
1answer
455 views

How to add an existing group to a newly created site through poweshell?

I am creating sites through powershell and creating the groups for them. I have a situation where if the group is already existing group then I have to add that group to the site. Coz might be ...
1
vote
1answer
3k views

SPLimitedWebPartManager throwing “File is not checked out” error on AddWebPart and DeleteWebPart

I'm writing a powershell function to add custom webparts (i.e. not Out Of The Box webparts such as ContentEditor) to publishing pages on a SharePoint Server 2010 site. I encountered a frustrating ...
0
votes
0answers
315 views

EnsureUser returns none existing users using ldapprovider

I'm writing a PowerShell script that adds users to a SharePoint site. To check if the user exists I'm calling the EnsureUser. But my issue is that the when calling this method with a ldap membership ...
2
votes
4answers
4k views

How to set columns visible only in Display Form on a Column used by a Content Type

I have a column that we will call C. This Column is associated to a Content Type (CT). If I go to the properties of the CT -> Column C I can set the column to be Facoltative or Hidden: If I put it ...
1
vote
1answer
442 views

Adding a content type to a list gives me a duplicate field error

I have the following code: list.ContentTypes.Add(contentType); It works on my dev environment, but on test fails with the following error: A duplicate field name "[GUID]" was found. I've had ...
1
vote
1answer
217 views

SharePoint 2010 Claims to Classic PowerShell help

I have a client requirement to move from Classic to Claims. I'm currently utilizing some PowerShell from http://derekmartin.org/archives/701 $webApp = $farm = get-SPFarm $wa = get-SPWebApplication ...
4
votes
1answer
8k views

How to update a deployed content-type?

I created a content-type and applied it inside a document library. Now, if I go to the conent-type gallery and delete one of the fields, and then go back to the library and view the available ...
0
votes
0answers
115 views

Update KPI Lists Script

I have about 400 KPI lists, and an error in one of the KPIs on each list. Is there a way I can update all of the lists automatically? I cannot use .NET, but a shell script is within an acceptable ...
1
vote
0answers
503 views

Remote PowerShell Script

I have server 1 (application that the script) (dax-sp) and server 2 (sharepoint) (sp-sp) Script on server 1 (ScriptStart.ps1) Set-Item WSMan:\localhost\Shell\MaxMemoryPerShellMB 2000 $pwd = ...
0
votes
1answer
213 views

Output powershell caml query to table

This has to be real easy but I just cant find an answer on google that will work in my case. I am running a ps1 file that caml queries a document library. I just want to organize these results into a ...
0
votes
1answer
219 views

Creating New-SPWeb from PowerShell & WebProvisioned Event Receiver?

I have a WebProvisioned event receiver and i do some work in this event receiver. When i create new webs from powershell, it seems the event receiver does not fire? Is this an expected situation? How ...
2
votes
1answer
3k views

Remove app from SharePoint with PowerShell

I have deployed an app to SharePoint 2013, but something went wrong during deployment. Now I cannot remove or redeploy this app. Can I force remove this app with powershell or STSADM, like you can ...
1
vote
1answer
259 views

SharePoint list updation using powershell script from sql trigger

I need to update a SharePoint list whenever a datachange happens in the sql cuastom table. I am trying achieve this by writting a trigger in the sqltable and calling PowerShell script to update list ...
0
votes
1answer
2k views

Changing the order of columns in a list view - Powershell

I am trying to add a new column called "REF" to all existing views using powershell which I have succeeded in doing, however when adding the column it is automatically added to the end of the array ...
0
votes
1answer
534 views

Restore-SPSite time scale to restore?

I am trying to restore the main site at the root of our SharePoint server after an accidental deletion using the following code: Restore-SPSite -Identity http://server -Path "B:\SharePoint\11-12-2012 ...
1
vote
4answers
925 views

Advantages/disadvantages of Timer Jobs vs. PowerShell scripts

I've worked with several examples of both SharePoint Timer Jobs and PowerShell scripts, some of them doing the same things as the other. In my experience, PowerShell scripts are far more flexible, ...
0
votes
2answers
368 views

How do I run the social timer jobs in powershell?

As title says. I've applied ratings to documents and they, obviously, haven't appeared yet. Is it possible to use powershell to explicitly force these timer jobs to run immediately? I believe the ...
1
vote
1answer
612 views

Exception Error When Running Basic PowerShell Script in SharePoint 2010

I have been doing some testing in our labs for some new features we are working on. I purposely created some orphaned sites using a scenario I found in a blog and I ran into a strange side effect. ...
2
votes
2answers
59 views

How to know the root web memory size in a site colelction

I need to get the memory consumed by the root web of the site collection. How could we know this using powershell scripting? Any ideas, please share me. Note- My farm is running on MOSS 2007.
1
vote
1answer
304 views

Unable to add webpart to page from script, but successfull from command line using same code

I am writing a script that will allow us to build an entire SharePoint environment, add solutions and implement web parts on particular pages from scratch. Nearly the entire script works except the ...
2
votes
2answers
3k views

How to change name and description website?

I need to create a script that creates a page based on a template. New-SPWeb -url http://site/project/project01 -template OFFILE#1 -name "01" Import-SPWeb http://site/project/project01 -Path ...
0
votes
1answer
961 views

Powershell error while iterating through sites quicklaunch and deleting a specific node

Hi I've put this question up here : http://stackoverflow.com/questions/13130785/delete-navigation-node-with-powershell-from-sharepoint-quicklaunch-in-all-sites but no answer yet so posting here too. ...
1
vote
2answers
2k views

How to insert data into Managed Metadata field of any Document Set using PowerShell?

I am creating a Document Set for a library using powershell and that document set contains some mandatory managed metadata fields. I am able to create document set but how can I insert data into those ...
0
votes
1answer
189 views

How to send mail in powershell based on exception count?

im trying to set up a Powershell script, which backs up a specific SiteCollection and sends an email afterwards, stating if the backup was successfully or not. I'm stuck at the point where I need to ...
0
votes
3answers
407 views

cannot find User after runing new-spuser

I have used following PS Script to add a user to a group on a web. I didn't any error but I cannot find the user in the group or anywhere else. Thanks for your advice. New-SPUser "wm\test2" -Web ...
3
votes
2answers
14k views

How to add Add-PSSnapin Microsoft.SharePoint.PowerShell to machine without SharePoint

How I can add Add-PSSnapin Microsoft.SharePoint.PowerShell to machine without SharePoint 2010? I try to run PowerShell script to Backup Farm on Windows Server 2008 R2 without Sharepoint but while I ...