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

0
votes
3answers
391 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 ...
2
votes
1answer
315 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
992 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
100 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
674 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
296 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
348 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
885 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
129 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
1k 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
1k 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 ...
1
vote
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
639 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 ...
1
vote
0answers
978 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
94 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 ...
0
votes
1answer
415 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
239 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 ...
2
votes
1answer
4k 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. ...
3
votes
4answers
2k 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
128 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
192 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 ...
1
vote
1answer
2k views

Get Identity of my Service Application

I have written following powershell code $list = Get-SPServiceApplication | ?{$_.DisplayName -eq "AmOwaWordSvcApp"} | %{$_.ServiceInstances} | ?{$_.Status -eq "Online"} For these 2 online ...
1
vote
1answer
481 views

Why are my list.view.query changes not being committed?

I'm using powershell to try to change the query for every view called either 'View Title 1' or 'View Title 2' in every list called 'News' in every subsite. The script doesn't throw any errors but the ...
1
vote
0answers
774 views

Why is my SPD 2010 workflow running twice?

I've got a support case for a client, and they have a super simple workflow on a list. It simply sends an email to a user from a person field, whenever an item is added to the list. The client ...
1
vote
1answer
60 views

Need help with the powershell script

I need some help with a power shell script. That is using a power shell I need to activate all the features of all the site collections by iterating each site collections in a web application.
0
votes
1answer
496 views

Power Shell List Item Copy

I am trying to copy a list from one web app to another web application .All the list items are copying fine except for Contact Details (which is column of type person).This column is showing empty . ...
3
votes
4answers
18k views

How do I update an already existing wsp on farm? [duplicate]

Possible Duplicate: Update-SPSolution does not Deploy Solution I have a wsp that is already deployed on the farm. I made some code changes. I cannot use the Add-SPSolution command because I ...
0
votes
3answers
607 views

PowerShell System.Reflection.TargetInvocationException on Line 1 - Permissions?

I've adapted a PowerShell script from Harry Chen's "SharePoint Connoisseur" blog to solve the broken Navigation Up issue he describes. My code is slightly modified, but only to reduce the data ...
0
votes
0answers
420 views

How do you prevent “Disable-SPFeature : Cannot complete this action. Please try again.” errors?

When I try to run this cmdlet, I receive the following errors (only sometimes): Disabling feature: SPFeatureDefinition Name=FeatureDefinition/b89234a6-xxxx-xxxx-xxxx-200dd03e1fdd ( ...
0
votes
1answer
2k views

Sharepoint 2010 404 Error after Renaming Subsite

We are still in the process of rolling out SharePoint, but we’ve got the server up and running and the primary site is working. We set it up as sharepoint.mydomain.com. I then created a new site ...
2
votes
3answers
1k views

Create a site collection policy programmatically

I have a requirement to create a site collection policy (retention policy) programmatically. It can be either a powershell script or in C# using Visual Studio 2010. I did a lot of research and am not ...
0
votes
2answers
851 views

An empty pipe element is not allowed - the Powershell I copied fails

I am just trying to fix something to get my BCS external list created. All indications are that the server has too many rows for BCS so here is what I put into the Powershell IDE running as ...
2
votes
2answers
2k views

PowerShell Set-WebApplication property bag doesn't work

I have this PowerShell script function SetPropertyBag ($webAppUrl, $key, $value) { $spwebApp=Get-SPWebApplication -Identity $webAppUrl Write $spwebApp ...
1
vote
1answer
819 views

Hide a feature in Site Collection Administration => Features area

I have a feature with webparts that needs to be activated using powershell. I need a way to either hide the feature on the Site Collection Administration => Features (under Site Settings) or to ...
0
votes
1answer
927 views

Powershell and CredSSP in Production Environments

I try deploy Sharepoint WSP projects using PowerShell Remoting. See PowerShell Remoting Sharepoint 2010 Error Solution is configure CredSSP for Sharepoint. But Microsoft says: Caution: Credential ...
0
votes
1answer
3k views

Emptying SharePoint Recycle Bin

Our SharePoint 2007 installation has a particularily immense First-Stage Recycle Bin. I wrote a PowerShell script a while back that deletes old items. Just for fun, that's posted below. UPDATE2: ...
0
votes
1answer
183 views

PowerShell version of SPWebapplication.FormDigestSettings.Enabled?

Does some one know the PowerShell equivalent version of the following SharePoint object model code: SPWebapplication.FormDigestSettings.Enabled = false;
1
vote
4answers
2k views

how to paste powershell script onto the Shell

I am trying to paste powershell script from a website but it doesn't let me right click on powershell console neither "Crtl + V" is working i downloaded powershell V.1
0
votes
1answer
222 views

Error while executing Powershell Script SharePoint 2010

I am writing a PS script to add,deploy solution and deploy the features. The sequence is as follows Check if solution already exists, if yes then Disable -SPFeature (Runs for around 10 features) ...
0
votes
1answer
2k views

Powershell script to update all users

Okay I am half asleep, what did I do wrong with my powershell script (modified with I have just watched the A-Team in mind) function update-fields () { #Set up default variables #My Site URL ...
4
votes
3answers
5k views

PowerShell and the client object model: “The collection has not been initialized”

I'm trying to grant a user permission to a SharePoint site using PowerShell and the client object model. The code I'm using is as follows: # Setup context $context=New-Object ...
0
votes
2answers
5k views

Feature Activation with Powershell

I am looking for a good example of powershell script for SP2010 with which I could activate my features with prior check if feature has been deployed (some are "web" and some are "site" scoped. Could ...
0
votes
2answers
96 views

SP 2010: Set RSS settings for a web application with powershell

PowerShell allows to set/retrieve web application settings e.g. $webApp = Get-SPWebApplication $siteURL $webApp.DefaultTimeZone Will return the Default Time Zone of the web application. I'm now ...
1
vote
1answer
421 views

Powershell script taking too long to finish

i wrote a power shell script to deploy my wsp to to SP 2010 server. It first checks if the solutions is already there and deployed if yes then retracts and redeploy again. It deploys to a specific web ...
0
votes
1answer
328 views

Powershell Script for Deployment and Activating Features SharePoint 2010

I am writing Powershell script for adding my solution,activating solution and at last activation features on my SP2010 server. There are no issues in adding solution and deploying the solution. Issues ...