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
2answers
842 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
794 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
910 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
181 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
218 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
95 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
416 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
327 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
1k 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
825 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
293 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
1k 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
989 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
636 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
3k 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
1k 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
251 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
1k 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
661 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
205 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
5k 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
228 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
4k 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 ...
0
votes
1answer
107 views

Powershell installation script with new registration

I created a Powershell script to install my solution. The script consist of several tasks, one is deploying a solution which contains a custom service application along with powershell cmdlets. The ...
0
votes
1answer
604 views

get custom fields only from a sharepoint list

Can anyone tell me how can I get the custom fields from a sharepoint list? I don't want to get all the fields like hidden, just the custom ones or the ones in the default view. The end result will be ...
1
vote
1answer
626 views

Error when enumerating through site columns

I'm working on a Sharepoint 2010 site. I am trying to run this script from a website in order to create an xml containing info on my site columns. $sourceWeb = Get-SPWeb http://farmstuff:1284 ...
0
votes
1answer
1k views

Deleting all alerts on a sharepoint list using powershell?

I understand alerts will only be show to those who created them. However I am on a test site and would like to rid the list of all alerts. Is there a way to do this programatically. I can seem to ...
6
votes
2answers
4k views

Move files between document libraries in the same Site Collection (#2)

Quick note: First and foremost - this is somewhat in line with a previous post of mine found here: Move files between document libraries in the same Site Collection however I've opened a new question ...
0
votes
1answer
2k views

Get last 10 search crawl logs sharepoint powershell

I want to get last few crawl log details of all of my content sources through powershell. Basically, its the search service application -> crawl logs -> crawl history -> for any content source I ...
2
votes
3answers
6k views

Programatically, how do I change the default document content type of a Document Library in SP2007?

I have 40 document library lists and I have to change the default document content type for these document libraries. In UI, this is possible by On the document library, go to Settings > Document ...
1
vote
1answer
228 views

Adding a field of type metadata with powershell

I'm trying to add a column of type Metadata. I've first exported the SchemaXml of an existing column on which i'm working. After that I added the column with method AddAsSchemaXml. The field is ...
2
votes
2answers
657 views

Can You Add a WebPart to a Wiki Home Page via Powershell?

Salvete! Is it possible to add a webpart to a Wiki Home Page via Powershell? I have 100 sites for which I need to add a web-part to their home-pages. I know this is easily possible with normal ...
1
vote
2answers
2k views

New-SPconfigurationDatabase: Invalid Address on single SP2010 install

Can anyone please help me with this as I'm sure im missing something small. I am installing SP2010 on a Win7 Prof machine. All components on one machine. SQL2008R2 installed and all the features are ...
1
vote
1answer
1k views

Backup-SPFarm or Backup-SPSite to backup a site collection and it's content database

Should I use Backup-SPFarm or Backup-SPSite to backup a site collection with it's content database? Dont both of them backs up with it's content database?
2
votes
1answer
934 views

Why am I still getting quota reached upload error after increasing the quota for a site collection?

A user was trying to upload documents to their site collection and reached the quota limit. I increased the quota for him but he is still getting the same error that the quota has been reached when he ...
0
votes
5answers
2k views

Can't find termstore sharepoint for metadata

I'm using powershell to add metadata to my termstore. When i go to the central administration, in metadata service I can see that i have one termstore. But when i try to access it through : $session ...
0
votes
2answers
699 views

Powershell deployment with nant - problem with script arguments

I have a powershell script updating my solution: Add-PSSnapin Microsoft.SharePoint.PowerShell write-host $args[0] Update-SPSolution -Identity PkbInfo.SP.wsp -literalpath $args[0] -GACDeployment ...
1
vote
3answers
1k views

What would be powershell version from this c# code?

What would be powershell version of this c# code? I am having hard time get this work in Powershell especially stringbuilder and files.add line where utf8encoding is. Here is my powershell version of ...
4
votes
6answers
618 views

SharePoint related PowerShell tutorials

I am really interested in PowerShell for SharePoint Administration. Please help me with some books, sources or tutotials.
6
votes
3answers
653 views

How to create a site collection

I need to create a site collection so that url looks like http://hr.mycompany.com instead of http://portal.mycompany.com/hr. How do I do that?
1
vote
2answers
2k views

update SPList using csv via Powershell

knowing that is possible in PS, exporting SPList items to PS objects(link1 link2) what is the best way, to go into the other way: Create/Update an SPList from an exported csv or format-table.
1
vote
2answers
3k views

PowerShell to backup a Web application

I need a PowerShell script which could perform the following: How to Back up and Content Database of a Web Application Restore a Content Database on a newly created Web Application
1
vote
3answers
967 views

Map FAST crawled property powershell

I want to map people properties in FAST Search: crawled properties to contents hidden using powershell. I know that I can get crawled properties using Get-FASTSearchMetadataCrawledProperty but this ...
1
vote
2answers
378 views

check if versioning enabled on sharepoint 2010 list

I have a PowerShell script that updates document libraries to make sure that versioning is enabled: $list.EnableVersioning = $true How can I check whether versioning is enabled before making the ...