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)

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
308 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
739 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
293 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
685 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
208 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
264 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
110 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
686 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 ...
2
votes
1answer
689 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
6k 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
3k 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
8k 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
237 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
831 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
2k 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
1k 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 ...
1
vote
6answers
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 application I can see that I have one termstore. But when I try to access it through ...
0
votes
2answers
867 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
757 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
753 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
3answers
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
1k 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
491 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 ...
2
votes
0answers
585 views

Getting Null returned from taxonomy field in PowerShell?

I am trying to update a metadata field when adding an item to document library. All the other columns are updating. The error is on this line and basically $taxfield is returning null. $taxField = ...
9
votes
2answers
2k views

SPWeb being closed when getting list by powershell. What's wrong?

When I run this little piece of powershell code: $w = Get-SPWeb http://localhost $l = $w.List["some list"] I get Unexpected error message to my Sharepoint ULS log Detected use of SPRequest for ...
0
votes
1answer
582 views

PowerShell Script: HashTable error

I wrote a PowerShell script which will loop thru all the sites in the web application and add Field internalname and title to the HashTable. So i pass this HashTable from one function to another. But ...
0
votes
1answer
145 views

How to identify if the list field come from web or site col?

I have a following task in sharepoint 2007 to identify if the list fields come from the parent web or site col, this i'm planning to do with a powershell script. So what I want to do is to iterate ...
2
votes
2answers
2k views

Importing/uploading files from file share to SP 2010 Doc Lib using CSV

Can someone please provide a good link (or if you already have a powershell working) that can import files from file share into SharePoint document library using a cvs flat file. I have about 20 ...
1
vote
1answer
692 views

Add Calendar list to WikiPage using Powershell

I have inserted a Calendar list to a page(SitePages/Home.aspx) using a powershell script, But I want to insert it in to a specific location as shown in image. When I insert the calendar list it insert ...
4
votes
2answers
3k views

Powershell Script to Set Quota

We are planning to apply quotas on our site collections of about 60 which are already created in our web application . i thought of achieving that using power shell but we are facing a small problem ...
1
vote
1answer
270 views

Download Versions of a SharePoint 2007 Document?

Can anyone point me in the direction of downloading all the versions of a file in a SharePoint 2007 document library? Is this possible with PowerShell, C#, or another way?
0
votes
1answer
860 views

Batch updating a new Audience Targeting column

We have a list with around 900 items, and recently the end-users decided to enable "Audience Targeting" on it. This added a new Audience Targeting column. The users now want to assign a default ...
0
votes
1answer
3k views

PowerShell to iterate through all SharePoint Lists

Is it possible to iterate through all the lists in a site collections and create a folder name "Test" using PowerShell? Fine Regards
1
vote
1answer
284 views

Look & Feel - Pagelayouts and Site Templates

I recently ran into a rather unfortunate assignment. It regards the selection of pagelayouts and sitetemplates which subsites should be able to use. As I'm supposed to change this for 20+ site ...
1
vote
1answer
371 views

Is it possible to run Content Deployment incrementally using code?

I am running some Content Deployment jobs using the code but the jobs are not run incrementally, instead they are run by exporting all the objects. Is it possible to run them incrementally using the ...
0
votes
1answer
393 views

How to move content within fields in a page layout?

I'm working on a requirement where I'm adding a few fields in an already existing Page Layout and also renaming all the fields. After adding the fields via code,I want to move content within fields ...
0
votes
1answer
3k views

Error: The file or folder name contains characters that are not permitted. Please use a different name

I took backup from our staging server and restored on my local development machine. My Powershell script is not raising any error while restoration. But when I open the site in browser, it's giving me ...