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
545 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
4k 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
387 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
6k 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
553 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
230 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
10k 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
129 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
569 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
228 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
239 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
4k 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
291 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
669 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
473 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
838 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
64 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
359 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
4k 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
501 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
16k 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
392 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
106 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
820 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
343 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
355 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
4k 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
148 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 ...
1
vote
2answers
2k views

Error Handling with Powershell Scripts for SharePoint 2010

I am very new to writing PS scripts for deploying solutions and activating features. In my current scripts I get errors some time like feature not activated or deactivated properly. I am looking ...
1
vote
1answer
2k views

How to modify sealed columns (Powershell)?

I'm trying to build and customize a group calendar list created with "Group work site" template. I have stumbled upon some sealed columns, like "All day event". I need to modify them, therefore I need ...
2
votes
2answers
1k views

SharePoint 2010 Record Declaration Settings via Powershell

I have 200 site collections that need to perform the following tasks:- A. At the Site Collection Administration - Record Declaration Settings Set Record Restriction to Block Delete Set Record ...
0
votes
3answers
809 views

Set Refresh All Published Content Types via Poweshell

To do the above task manually we can go to the Site Actions -> Site Settings -> Site Collection Administration -> Content Type Publishing and checked the Refresh all published content types on next ...
2
votes
0answers
1k views

Workflow failed to run after pause - SP2010

I am trying to fix a paused workflow issue following this KB Article from Microsoft. http://support.microsoft.com/kb/2674684 However, when I try to run the powershell command I get this error as ...
1
vote
1answer
1k views

Export-SPWeb with Where Clause to filter List Items?

I am trying to export list items to a local folder but I only want certain items, not the complete list.Is this possible? I have tried to iterate through the SPListCollection with the "Modified" ...
0
votes
1answer
107 views

Issue in creating New_SPProfileapplication

I am Trying to create the "New SP Profile Service Application" using Powershell command New-SPProfileServiceApplication -Name SharedServices1 –ApplicationPool "SharePoint Web Services" –ProfileDBName ...
1
vote
1answer
537 views

Deploy with PowerShell issue

When I deploy my project from visual studio everything is fine, I have a module with some pictures in it and a stylesheet that get replaced on deployment, from the output window: Retracting ...
1
vote
2answers
271 views

Error while updating SiteLogoUrl with Powershell

I am trying to update the Site Logo Url for all the sites in my web application with powershell. The script executes correctly in my dev environment but fails to execute in production and gives an ...
3
votes
1answer
5k views

how to Update/Add list items via New-WebServiceProxy in powershell?

Over View:   I’m trying to automate updates to a SharePoint list using PowerShell via the Web service object.   The end goal is to remove items all from the list, then import new data via a csv file. ...
4
votes
4answers
3k views

How to programmatically determine which application pool a service application is using?

Is there a way to programmatically determine which application pool a service application is using? Further i would like to get the information about the service account the app pool is using.
0
votes
1answer
153 views

Is it possible to Enable SP SessionStateService for “a specific” SP Web application?

I have a SP2010 Server (enterprise edition) that hosts many web applications. Only one application requires a SQL Session State service. The Powershell command Enable-SPSessionStateService does not ...
0
votes
1answer
215 views

Error on Feature Deactivation with Power Shell Script

I have written some code in my feature receivers on feature activation and deactivation for my SharePoint 2010 site. Basically some contents are added on feature activation and same are deleted when ...