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
4answers
3k views

SharePoint 2010 - Add WebPart to a Web with PowerShell

I want to add a webpart to a great number of existing pages. Is there any PowerShell command to add a webpart to a webpart page?
1
vote
1answer
1k views

SharePoint 2010 - Add filter to a list with PowerShell

How it is possible to add a filter to a list with PowerShell? (I want to add a filter to multiple lists) Is there any tutorial, articel or example?
2
votes
1answer
4k views

Activating a WebApplication Scoped Feature for a particular WebApplication

I developed a SharePoint 2010 WSP that contains a custom HTTP Module for performing short-url redirects. The WSP also contains a WebApplication scoped feature that consists of a feature receiver that ...
0
votes
2answers
469 views

powershell command to determine theme used by webs or a site collection

Is there a powershell command to determine the name of the theme is used by webs under a site collection? If yes, is there a powershell way to dissassociate the theme from a web or all the webs under ...
1
vote
2answers
377 views

Are there any way to change the authentication type to claims based in code without using Powershell?

I'm creating an application that changes the authentication type to Claims based, but I'm trying not to use powershell. any advice?
4
votes
2answers
7k views

Error: Access Denied (Including Site Collection Admins) for all users

I have migrated to Sharepoint 2010 successfully but Search service wasn't working every time I get system error when I perform search. Today I have tried following things on server, 1] Application ...
0
votes
1answer
368 views

Force theme refresh with PowerShell

Is there a way to force the theme to refresh using PowerShell? When I deploy a CSS file with my style, I currently have to change theme, then back again manually. I would like to know if it is ...
7
votes
2answers
5k views

PowerShell: Update People Picker Field with domain\Username

I'm trying to get this to work in PowerShell: $spListItem[$ppField] = "domain\username" $spListItem.Update() This gives me the following error: Exception calling "Update" with "0" ...
1
vote
2answers
1k views

Test-spcontentdatabase returns The server instance of the database could not be found

I am trying to run Test-spcontentdatabase on a MOSS database on a SQL server (2008 R2). When I run it I get "The server instance of the database could not be found." The ULS has no more information ...
1
vote
0answers
808 views

Getting the following error: Another topology activation is in progress

I am using Search Server Express 2010. I am creating Search application using PowerShell scripts. After creating crawl and query components, i am activating them. First activating crawl component ...
1
vote
1answer
460 views

Can't deactivate a user solution without breaking the site

[Edit] Rewrote the question, as there are simpler ways to reproduce the problem. [/Edit] I have built a reusable workflow with SharePoint Designer 2010. I saved the workflow as template, grab the ...
5
votes
5answers
16k views

List of databases used for a sharepoint 2010 farm?

How to find the list of databases are used by a SharePoint 2010 Farm, including content databases, service application databases and configuration database.
1
vote
1answer
745 views

Values in SPSite.UsageInfo are always zero

I am trying to retrieve information about site usage via SPSite.UsageInfo programatically or via PowerShell. Here is simple PowerShell code: $site = Get-SPSite "http://intranet" $site.Usage And it ...
1
vote
1answer
5k views

powershell to delete items from a list where created date < “1/1/2011”

Is there a quick powershell script to delete items from a list where created date is less than some date? Also, would the deleted items be in the recycle bin (in the event business team wants to ...
1
vote
1answer
2k views

Import-SPWeb throws exception “A duplicate field named [guid here] was found”

From the SharePoint 2010 Powershell console, I'm importing a site collection into the same parent site collection as the source. (ie. http://parent/sites/sourcesite has been exported with Export-SPWeb ...
0
votes
1answer
94 views

is there a powershell to see all the site collection for a given conent db

Get-SpSite I am trying to find powershell syntax to list all the site collection for a given content database. Is there 1 line syntax for this? Thanks
4
votes
1answer
8k views

Adding a site column and add it to a content type from PowerShell issue

Within a PS script, I'm trying to add a site column and add this column to a custom content type. Here is my script : add-pssnapin Microsoft.SharePoint.PowerShell -EA 0 function ...
1
vote
3answers
3k views

Remove an Application Pool in SharePoint 2010 that contain a hyphen in title

As the subject says - i'm trying to remove an application pool using the SP Management Shell (using Administrator). I have a pool named SharePoint - User Profiles I try to remove this app pool by ...
1
vote
0answers
47 views

Powershell that sends email but stops after 400 [closed]

I am left with a power-shell script that read a sharepoint list (about 2500 email addresses in it) and sends email. However, ps stops after 400 emails. Could be a limitation by firewall or system IT, ...
2
votes
1answer
354 views

How to access the web-application hosted on the another Farm using SharePoint 2010 Management Shell?

I am trying to access the web-application that is hosted on the another SharePoint 2010 Farm using SharePoint 2010 Management Shell cmdlets but it is failing with the below error message $spsite = ...
0
votes
1answer
714 views

Powershell command for Excel Services?

Is there a powershell to restart the excel services? If yes, what is the syntax to restart the excel services.
0
votes
1answer
834 views

Export all subsites

I am looking for a quick way to export all sub-sites from a web application and exclude the root url, is there a quick way to accomplish this?
3
votes
3answers
6k views

How can I use PowerShell to upload a list template (stp file)?

I need to script the creation of data in SharePoint, and part of this requires that I upload a slide library list template using PowerShell. Is this possible?
0
votes
1answer
2k views

How do I create a new content source using powershell?

I am new to Shell Script. I would like to write a script to generate new content source for search. I wrote the following code to create a content source. $searchapp = ...
7
votes
4answers
5k views

Automatically add pssnapin Microsoft.Sharepoint.Powershell

I am developing in Sharepoint and I like more Windows Powershell than Sharepoint Management Shell. Every time I restart the development machine, I have to run Add-PSSnapin ...
2
votes
1answer
4k views

How do I export site security groups and memberships with PowerShell?

I'm looking for a PowerShell script (or tool) to export a site's groups and group memberships to a text file. These files would be used as backup for the current security configuration in case the ...
0
votes
2answers
183 views

Powershell (or sts command) for moving SC databases

I have 5 sc in 1 database (Database1). (Databases have been created for each sc). Now the task is to move 4 of the sc database from Database1 and put them into different database (where they belong). ...
2
votes
3answers
6k views

SharePoint 2010 - Install Site Template using Powershell script

I want to install site template in SharePoint 2010. Basically i want to know how use install-spwebtemplate wsp name : SPT_SiteTemplate.wsp Name : SPT_SiteTemplate
1
vote
2answers
368 views

Powershell calling custom code has SPWeb.CurrentUser = null (in certain cases)

I have a custom assembly which contains code to setup Variations for a SharePoint 2010 Publishing site. This code is based off a blog post from Waldek I have a PowerShell script in which I create a ...
2
votes
3answers
658 views

How to view what a user has access to with PowerShell?

A user has limited access but I don't know what for. How can I view what this user has access to? I'm on WSS 3. Does anyone know of a PowerShell script to perform this method?
2
votes
3answers
1k views

Powershell creating Page fails with “No parameterless constructor defined for this object.”

I wrote a Powershell script that creates SharePoint sites and pages based on an XML file to generate about 200 sites and more pages to build a specific structure. The basic steps it does repeatedly ...
0
votes
2answers
550 views

Want to run Sharepoint/Powershell tools on local machine - what do I need?

My local machine is not a SP server, but i want to be able to run powershell and connect to a SP 2010 server to administer it. What do I need to install locally?
3
votes
1answer
393 views

User not showing on People page although listed when using Powershell

I'm using SharePoint 2010 (14.0.4763.1000) and have a user that is not showing on the People page (_layouts/people.aspx?MembershipGroupId=3). MembershipGroupId=3 is the Owner's Group. When using ...
0
votes
1answer
1k views

Running powershell within a SharePoint application page (C#)

I have a feature that deploys an application page to the layouts directory. I am attempting to update the content (or config?) database by executing a powershell command from c#. The following code ...
3
votes
1answer
3k views

Set SPWeb title on a SharePoint site using PowerShell

I'm having problems setting the title of a root web in a site collection when creating it in an other language then English. When i run the script under using 1033, it works fine the site title is set ...
12
votes
5answers
25k views

Powershell: cannot access the local farm

Yes, I am logged into the machine as an administrator, and my domain account id a farm admin as well. The site is running properly, and nothing seems wrong in SP Central Administration. But when I ...
6
votes
1answer
2k views

Script to find all items that do not inherit permissions

I would like a SP 2010 Powershell script which searches all folders in a library and finds the ones that do not inherit permissions from their parent. Does anyone have one handy? I'm new to the ...
0
votes
2answers
141 views

Getting started with Powershell

I am just getting started with a basic tutorial to Sharepoint and Powershell, following the following commands while in Powershell on my SP server: ...
4
votes
3answers
2k views

Deploying a site template and instantiate it in the same PowerShell script?

I want to create a PowerShell script that : add a farm solution that only contains a site template deploy the solution globally wait for the deploy job to finish create a site collection based on ...
3
votes
1answer
4k views

export / import spweb problem with DataConnectionLibrary feature

I'm attempting to export a subsite from staging to production using powershell and export-spweb and import-spweb. This worked just fine from staging to development. When we try to run this on ...
2
votes
3answers
1k views

Object Reference Not Set Error in SPImport.Run()

I'm trying to move my site from a server to another. I exported my site using Export-SPWeb, moved the data to destination server and ran the function below: (Taken from here.) function ...
2
votes
9answers
2k views

“Specified Cast is Not Valid” in PowerShell When Getting a Display Group for Search

When run, this code returns an error on the last line "Error Calling GetDisplayGroup with 2 arguments, Specified cast is not valid". $site=get-spsite http://xxx/sites/xxx ...
4
votes
1answer
762 views

Set default value for SharePoint Calendar description field

How can you set the default value for the 'Description' field for a SharePoint 2010 calendar list? There is nothing in the web interface for doing this, so I have tried it with PowerShell. $w = ...
0
votes
4answers
6k views

Different Version Problems in Restoring Sharepoint Sİte [closed]

I'm trying to move a Sharepoint site from one Sharepoint 2010 server to another. I used the Backup-SPSite cmdlet to create a backup file. It gives the error below after I try to restore with the ...
12
votes
4answers
27k views

PowerShell: Script to check feature status (enabled/disabled) before activating

I am developing a script to refresh my custom features. Earlier i was just looping through the features and calling Disable-SPFeature and Enable-SPFeature on each items. The issue is when the ...
2
votes
3answers
4k views

How to find the SiteCollection created date in Sharepoint 2010?

I want to find the sitecollection created and last content modified date in Sharepoint 2010, found a SPSite property for last content modified date however could not find any clue to find the created ...
5
votes
6answers
15k views

Error - Get-SPWeb in Powershell

I am running this simple command from powershell under a user context, who has db_owner and SharePoint_shell rights to the SharePoint_config database. I get the following error: PS ...
2
votes
1answer
2k views

Using powershell enable windows authentication on claims based authentication web application

I am creating a web application using Claims based authentication as follows: $databaseName = "WSS_Content_$port" $authMethod = "NTLM" write-host "Creating $title web application on port $port..." ...
5
votes
5answers
9k views

SharePoint 2010 - Backup Term Store as CSV

Is there any PowerShell Script to export the Term Store? I have not found any OOTB solution, only import as csv, but no export as csv. Is there a script which can export the Term Store as csv? (So ...
1
vote
3answers
328 views

Automated PowerShell scripts

If I wanted to create a PowerShell script how can I make one that include the sharepoint commandlets