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)

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
794 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
104 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
527 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
151 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
214 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
562 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 ...
2
votes
1answer
918 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
506 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
25k 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
744 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
537 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
1k 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
954 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
1k 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
204 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
4k 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
255 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
6k 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
98 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
467 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
366 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 ...
1
vote
3answers
2k views

Not able to get Cells.Items method of the work sheet object in power shell [closed]

I need to read cells values from a worksheet and i am referencing the following piece of code, however i don't get .Items() method. Code Referred: $objWorksheet.Cells.Item(2,1).Text Also is there ...
0
votes
2answers
1k views

Error while adding permissions to group

I used the folowing stmt to add permissions to group: $spWeb.RoleAssignments.Add($roleAssignment) gives following error Exception calling "Add" with "1" argument(s): "This operation is not ...
1
vote
1answer
313 views

Is there a way to move files with the SP Object model in MOSS whilst retaining meta data?

Is there a way in SharePoint 2007 to move a file from one document library to another, in the same site collection programatically? I made this post about this on StackOverflow, with a bounty not too ...
3
votes
1answer
2k views

Create a site using powershell for a custom site definition

I have created a custom site definition which I can see and create a site using my custom definition with the UI. However, if I try to create a site using powershell I get an error saying WARNING: ...
2
votes
2answers
1k views

Modify document library view on all subsites in a site collection

I have close to 1000 subsites in a site collection. I would like to remove the country column from the defualt view in each site with one power shell script. This is how I would do it for one site, ...
1
vote
2answers
767 views

How can I export external content type as a BDCM file with powershell?

I can export external content type from SharePoint Designer or Central Administration. However, I want to export ect as bdcm file with powershell in order to export ect automatically. There is an ...
4
votes
2answers
4k views

Removing Orphaned WebParts via PowerShell - CheckIn/CheckOut Requirement Loop

A client migrated from 2007 to 2010 doing a database detach/reattach without checking the database for orphaned objects first. I whipped up a PowerShell script to programmatically remove orphaned ...
6
votes
1answer
2k views

Extracting Comments from Version History in Powershell

So I am trying to extract version history from a document library in Powershell. I have found the commands/scripts to do this. However I cannot seem to get the comments. From my script I can get ...
0
votes
1answer
304 views

sharepoint 2010 Remote Blob Storage , RemoteBlobStorageSettings is false

Im following this article for enable RBS on sharepoint 2010 i thinks its best article for that after a lot of search : http://www.simple-talk.com/content/print.aspx?article=1280 when I try the Step ...
0
votes
3answers
2k views

Restore-SPSite fails without any useful error

I'm trying to restore from a backup via PowerShell with the following commands: add-pssnapin Microsoft.SharePoint.PowerShell restore-spsite -Force -Confirm:$false -Identity ...
1
vote
1answer
693 views

Extending the SharePoint PowerShell Console

I have written a bunch of PowerShell functions mostly related to SharePoint, but not only SharePoint. I'd like to extend the SharePoint PowerShell console to make my functions always available from ...
0
votes
0answers
209 views

Stop Powershell Script asociated with list sharepoint

I created the next script with powershell and it updates all the items in a list: Add-PSSnapin "Microsoft.Sharepoint.Powershell" $site = Get-SPWeb -identity "http://mywebsite" $list = ...
3
votes
2answers
6k views

What's wrong with Uninstall-SPSolution and AllWebApplications parameter?

When I try to uninstall WSP with following line, everything is ok: Uninstall-SPSolution project.wsp # no error - OK When I try to add switch parameter -AllWebApplications, I get error (something ...
0
votes
1answer
275 views

How do I add a new ContentType using Feature Upgrading?

I have created a new Content Type. How do I publish it using Update-SPSolution and feature upgrading? I added the following Code to my Feature Manifest: <UpgradeActions> <VersionRange ...
0
votes
1answer
5k views

Delete Content Types using PowerShell

I am new to PowerShell script. I am trying to run this specific script using .ps1 but received an error. Where do I put our SharePoint URL and the Content Type name in the script. Here is the script ...