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
1answer
213 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
73 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 ...
1
vote
1answer
2k 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
373 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
0answers
98 views

Finding which site collection has output cache enabled through powershell

I have a SharePoint 2010 production farm where a Web Application running on port 90 always ends up with heavy memory usage , even during non-peak hours. My guess is some site has output cache enabled ...
0
votes
1answer
77 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
132 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
478 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 ...
0
votes
1answer
260 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
336 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
57 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
321 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 . ...
0
votes
4answers
4k 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
2answers
231 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
183 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
804 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 ...
1
vote
2answers
341 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
492 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 ...
1
vote
1answer
526 views

power shell set web application property bag doesn't work

i have this power shell script function SetPropertyBag ($webAppUrl, $key, $value) { $spwebApp=Get-SPWebApplication -Identity $webAppUrl Write $spwebApp if($spwebApp.Properties.ContainsKey($key) ...
0
votes
0answers
280 views

Unable to create inheriting content types - A duplicate content type was found

I'm trying to create several content types via code, and they are all inheriting from a custom content type which was previously deployed. Here's the weird part, i can deploy once from Visual studio ...
0
votes
1answer
397 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
0answers
23 views

Methods to obtain a list/map of permissions throughout the web application?

Are there any scripts that list out the permissions for all the site collections>>sites>>lists and libraries within a web application? My objective is to obtain a list showing inherited as well as ...
0
votes
1answer
427 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
0answers
380 views

PowerShell Remoting Sharepoint 2010 Error

I use PS Remoting 2.0 for deploy WSP projects in Sharepoint 2010 in Windows 2008 server (named DESMOSSW03). My client is Windows 7 64 bits (named MyUser). I use this credentials ...
0
votes
2answers
1k 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
96 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
3answers
196 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
107 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
856 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 ...
2
votes
3answers
1k 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
4k 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
69 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
255 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
155 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 ...
0
votes
0answers
71 views

Update Managed Data Source Stored Credentials with Powershell?

I have over 200 sites and I am using SSRS reporting. Each site has 20 reports. When the credentials change this is an obvious headache. Is there a powershell script to update the username/password of ...
0
votes
1answer
365 views

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

I need to read cells values from worksheet and i am referening folowing piece of code, however i don't get .Items() method Code Refered: $objWorksheet.Cells.Item(2,1).Text Also is there any other ...
0
votes
1answer
308 views

Erro while assing 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 ...
0
votes
0answers
117 views

Gives Error while assing permissions to group

New-Object : Cannot find type [Microsoft.Sharepoint.SPRoleAssignment]: make sure the assembly containing this type is loaded. Note: i have added the snap-in as follows Add-PSSnapin ...
1
vote
1answer
173 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
517 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: ...
1
vote
2answers
546 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, ...
0
votes
2answers
363 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
1k 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 ...
5
votes
1answer
551 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
127 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
4answers
673 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
535 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
195 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
2k 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
115 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 ...

1 3 4 5 6 7 14