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
2answers
1k views

How can I query all of the items which are inside a folder, which is in turn inside a document library?

I am trying to use Powershell to query my Sharepoint site so I can get a list of items to use as input in my migration script. I have a document library (Site Assets), which has a folder (Calendar ...
1
vote
1answer
1k views

Modify “Link” field using Powershell

How do I change both the URL and description of a "Link" field using a Powershell script? In the past I've used the following: $newitem = $splist.Items.Add() $newitem["Title"] = $somestuff
3
votes
4answers
1k views

What is the recommended way to query data on a Sharepoint site?

Say if I need to retrieve list items for batch processing, how would I be recommended to retrieve the data? Maybe Powershell or a SQL Server query?
3
votes
3answers
3k views

How can I use Powershell to move a list from a development to a production Sharepoint 2010 box?

I'd like to copy a list (and its contents) onto our production server. I've been trying to use the Export-SPWeb cmdlet, using this article as a reference, but I can't seem to get it to cooperate. I've ...
2
votes
2answers
427 views

Is there a way to assign a search server to a content database using PowerShell?

Is there a way to assign a SharePoint Foundation search server to a content database using PowerShell, either while creating an Sp-WebApplication using New-SpWebApplication or by updating an ...
1
vote
0answers
284 views

New-SPProjectWebInstance error

One part of my now rather large install&configure script for SharePoint is giving me much grief. If i type the command in the shell it works perfect, saying something about "provisioning added to ...
7
votes
4answers
4k views

How can I schedule the User Profile Service to run a full sync weekly?

We are running SharePoint Server 2010 and have not yet applied SP1. User profile incremental sync is not picking up all of the group membership from AD. Starting a full sync seems to rectify the ...
1
vote
2answers
6k views

upload master page using powershell

What i am trying to acchieve is to write a script that will automatically update all master pages on all site collections in a certain web application. The only problem i am having is that when i ...
1
vote
4answers
871 views

openweb does not contain an object.

When writing my powershell code, the openweb command returns an empty object. this is the code: PS C:\Users\SP_admin> $spsite = get-spsite "https://adress.nl/sites/dcprogrammabureau" PS ...
2
votes
1answer
433 views

Enabling a Sharepoint Feature with Powershell

I am new to PowerShell and have been asked to modify a script that is used to activate features on a site. The script has some latency issues between the two feature activations, so I decided to make ...
2
votes
1answer
800 views

Querying multiple lists with GetItems not returning viewfields

I have written a script to get the items of a specific list leveraging the GetListItems method, but I am now being asked to join multiple lists, so I believe I must use the GetItems method. The code ...
5
votes
3answers
9k views

SPSite.allwebs returns error

First of all sorry if this is an obvious question, I searched a lot but can't find the solution. When I open an spsite in powershell like this: $spsite = Get-SPSite "https://adress" And then I ...
6
votes
3answers
2k views

How can I modify a file stored in SharePoint via PowerShell?

I have some files in SP 2010 that are simply HTML, and I need to modify the contents of those files in a systematic manner. Is there a good way to do this using powershell? Imagine that I want to ...
0
votes
1answer
695 views

Multiple Managed Metadata Service Instances

I am seeing multiple Managed Metadata Web Services in my farm and am not sure what to make of it. I was expecting to see one instance why are there others? Get-SPServiceInstance | ...
0
votes
4answers
10k views

Restore-SPSite failure due to insufficient Content Database Space

I hope someone can help me solve this weird problem I'm facing for 4 days. I'm trying to restore the backup of Sharepoint 2010 web application. I'm using Windows Powershell command : Restore-SPSite ...
1
vote
3answers
4k views

PowerShell script to give reader permission for a user in site collection

I have a SharePoint server where I built a site collection that contains many subsites inside. I want to give a user a reader permission across whole site collection sub sites. How to do it using a ...
0
votes
1answer
208 views

What's the database impact of Central Administration Site Export? Locked for Writes AND Reads?

We're about to move a site from a parallel site collection into a subsite of the other site collection. Both SC's are in the same Web Application. We have not been able to get the command line ...
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
2k 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
5k 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
544 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
382 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
390 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
6k 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
864 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
493 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
18k 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
844 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
6k 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
95 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
5
votes
1answer
9k 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
48 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
363 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
815 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
843 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
6k 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
187 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
385 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
694 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
621 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
409 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 ...