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)

0
votes
1answer
1k views

Set document library Document Template using PowerShell

I'm using the code below to create document libraries, but I need to set the "Document template" value to "Web part page". I can list the document templates using $spWeb.DocTemplates - but how can I ...
1
vote
4answers
2k views

Importing csv file with 1000 terms and 5 levels using powershell

I am using this code for it but I am unable to get the hierarchy which I got from the file.... $taxonomySite = Get-SPSite http:url $taxonomySession = Get-SPTaxonomySession -site $taxonomySite ...
1
vote
3answers
3k views

Powershell - Item Level Permission by Content Type

Here is the scenario. I only need to run this once as business team just decided their contents are confidential. User Group is "Marketing", will use OOTB "Contribute" and all of marketing items are ...
3
votes
2answers
6k views

Powershell Get-SPServiceInstance - The term 'Get-SPServiceInstance' is not recognized as the name of a cmdlet

On a fresh SP2010 install. I run powershell as the admin I have my policy set to unrestricted. I've tried embedding this in a .ps1 file or running in the shell.. but get: Powershell ...
1
vote
1answer
1k views

NullReferenceException when running New-SPSite

I'm running the following PowerShell script on my SharePoint server to create a new host-header site collection and a tenant admin site: Add-PSSnapin microsoft.sharepoint.powershell -ea ...
1
vote
2answers
400 views

Creating a disaster recovery policy for SP2010

I'm working on creating a SharePoint 2010 Enterprise Server disaster recovery (and backup-restore) policy for our organization. From what I've read, there are several options for doing backup-restore: ...
2
votes
2answers
359 views

Deleting Dead User Accounts from Sharepoint Alerts,Assigned to E-Mails ,Workflows

how delete Dead User Accounts from Sharepoint Alerts,Assigned to E-Mails ,Workflows.
0
votes
2answers
2k views

getting Create Error when using Powershell

I am receiving this error on following line Exception calling "Create" with "4" argument(s): "Value cannot be null. Parameter name: parentFolder" At x:\Dev\PowerShell\MoveFiles2DocSet.ps1:29 ...
1
vote
1answer
2k views

Create Document Set if it does not exist (Powershell)

Adding If doc set does not exist then create doc set. What would be the syntax for looking up document set then create (if does not exists) ### Create new Document Set ...
1
vote
1answer
2k views

PowerShell script for searching lists for specific links?

being both quite new to both PowerShell and SharePoint 2010 I'm wondering if there is any way to make a script for searching a lists for links that begins in a certain way? I want to find all the ...
1
vote
1answer
2k views

PowerShell Script that modify items's value in SharePoint 2007 List/Library recurrently

Is it possible to have a PowerShell script that can modify some item's values in a SharePoint 2007 List or SharePoint Document Library on the last day at 2359 Hrs every month? (If it is possible, it ...
3
votes
4answers
2k views

Remote Access to SharePoint Lists with PowerShell

I have a PowerShell script that pulls data from a database. I need to push this data to a SharePoint list on a different server. Would you have tutorial or examples that show how to do this ...
0
votes
1answer
5k views

Powershell - Delete List using powershell commands

I need to delete list from a site collection using power shell commands. Can anyone help me with the code. [Actual requirement : Delete all list which starts with "xyz"]
0
votes
2answers
3k views

Problem with Restore-SPFarm

We have to move a Sharepoint 2010 web application from and old server to a new one. The old server has Sharepoint 2010 and SQL Server both installed. The new server is actually 2 VMs, one for ...
1
vote
0answers
42 views

Content Replacement

I have a problem with content deployment that I need to fix using a script to replace content throughout the site. SharePoint handles relative urls already but editors have to use an internal url ...
3
votes
6answers
8k views

Backup and Restore SharePoint 2010 SiteCollections

I am getting an error "Backup version is different" while restoring SiteCollections from one web application to another on the same SharePoint server farm. Following are the steps I was executing when ...
0
votes
2answers
2k views

Difference between backup-SPFarm and Backup-SPConfigurationDatabase in sharepoint foundation 2010

I want to know difference between backup-SPFarm and Backup-SPConfigurationDatabase powershell command. I know backup-SPFarm is used to take backup of whole farm then why to use ...
1
vote
1answer
918 views

Migrating Document libraries to new location (and new subsite) while retaining internal ID's

I'm currently using SPExportSettings and SPImportSettings to migrate some content from an old 2007 environment. The below code is all working fine, as designed, but not as I'd like. My document ...
2
votes
1answer
1k views

SharePoint 2010 - Add WebPart reference to PowerShell script

I want to add a new developed WebPart to a SharePoint site with PowerShell. How it is possible to add the WebPart reference from my WebPart to the PowerShell script? $web = Get-SPWeb $urlWeb ...
1
vote
2answers
3k views

powershell script to move files from doc lib to doc set witin the same lib

Need to find out the document set name from a field name called "Region". I need to set the doc set name to be whatever Region is (NW, SW, NE, SE, etc.) and move files from root of the document ...
2
votes
1answer
1k views

How do you determine the Consumers for a given Content Type?

Is there a quick powershell script to find out all the consumers who are consuming a given content type? If yes, how do you do this with powershell?
2
votes
1answer
4k views

How can I get an SPList's URL?

Say I have a list named Links. Is there a way, through .NET and Powershell, to retrieve the URL for this list? In this case, the URL I'm looking for would be "/Lists/Links".
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
2k 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
414 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
277 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
3k 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
5k 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
799 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
427 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
771 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 ...
4
votes
3answers
7k 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
661 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
9k 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
3k 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
2k 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
493 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
379 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
374 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
4k 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
830 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
467 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 ...