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
1answer
210 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 ...
2
votes
1answer
734 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
5k 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
884 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
407 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
587 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
443 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
275 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
885 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
52 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
822 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
591 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
761 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
520 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
377 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
5k 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
535 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
228 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
9k 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
123 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
553 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
223 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
231 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
281 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
638 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
1k 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
446 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
788 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
63 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
339 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
1k 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
3answers
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
196 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
481 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 ...
4
votes
2answers
15k 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 ...
2
votes
1answer
376 views

Programatically update field/column name in a list on all sub sites [Powershell]

What I want to do is with a Powershell script programatically go through all subsites in a site collection and change a column name in a list from "Web" to "Site". So in easier words: Go through ...
1
vote
1answer
1k views

automatically create subfolder and save the file in sharepoint using powershell

I am new in powershell, i want to save a file which powershell will automatically create new subfolder in sharepoint 2010 and save it ( the subfolder named should be todayname i.e. 25Oct2012) : here ...
0
votes
1answer
1k views

SPFolder.Item does not return SPListItem associated with SPFolder in Powershell

I have following powershell: $webUrl = 'http://demo2010a:90/sites/Contracts' $web = Get-SPWeb $webUrl; $lists = $web.GetListsOfType($SPBaseTypeDocumentLibrary); foreach ($list in ...
0
votes
0answers
102 views

Automated PowerShell task cant create list items

I have a powershell script that gathers some data and looks to upload that data to SharePoint. Im uploading the data via 2 methods, as an excel spreadsheet, and as a list item in a custom list. When ...
2
votes
1answer
793 views

Problem with PowerShell script in Tasks Sheduler Windows Server 2008 R2 - SharePoint Shell Access?

I have a problem with PowerShell script in Tasks Sheduler in Windows Server 2008 R2. I try to run Sheduler Tasks which run batch file which run PowerShell script to Backup Farm and while I choose "Run ...
0
votes
1answer
335 views

Improve performance of powershell script

I am using following Powershell script to break the folder permissions inside the Record Libraries: $webUrl = 'http://intranet' $web = Get-SPWeb $webUrl; $SPBaseTypeDocumentLibrary = ...
1
vote
2answers
352 views

Powershell Get Replacement info from User Profile for all users

I want to extract info regarding Username and Replacements from the users profile properties for all users and have it written to a csv file. Maybee through a powershell script so it can run in a ...
0
votes
1answer
1k views

Restore-SPSite running forever

I'm trying to restore SPSite from backup. But powershell Restore-SPSite command keeps running forever. What can be the reason for this?
1
vote
3answers
3k views

Trying to save a file to SharePoint library via Powershell, but it doesnt work

Im trying to upload a file to a document library in SharePoint 2010 via powershell. Ive followed about 5 different blog posts, most recently the one found here - ...
0
votes
0answers
143 views

Problem with adding webparts with limitedWebManager.ImportWebPart PowerShell

When creating a web in Visual Studio it generates a web part where the namespace and the class name is the same. I'm thinking that this is giving me a problem with the limitedWebManager.ImportWebPart ...
0
votes
2answers
2k views

ProcessBatchData CAML Mass Delete SPListItems

Attempting to bulk delete List Item using ProcessBatchData in a PowerShell script. Here is a command that my code is generating but I am getting an error when it executes. I have been unable to find ...