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
5answers
9k 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
287 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 $...
6
votes
5answers
9k 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 Microsoft.SharePoint....
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
106 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
568 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
393 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
4k 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
2k 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
335 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
3k 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
914 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
5k 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
379 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 ...
3
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 https://uslv-acsw-t4.dev....
1
vote
1answer
713 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
213 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 = $site.Lists["...
4
votes
2answers
8k 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
313 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
7k 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
120 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
878 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
827 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
2k 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 ...
7
votes
2answers
9k 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
4k 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
10k 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
257 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 here,...
3
votes
2answers
1k 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 web-...
1
vote
2answers
3k 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
3k 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
1k 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
1k 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
932 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
4k 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
816 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
715 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
3k 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
711 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
171 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 ...
3
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
1k 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 ...