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)

6
votes
4answers
11k views

How to fix credential issue?

I tried both default credential and user/pass but keep getting 401 unauthorized error. What's the fix? Here is the error I am getting .... New-WebServiceProxy : The request failed with HTTP status ...
0
votes
1answer
2k views

Turn on anonymous access in SharePoint2010 web application using PowerShell

I try to use the Set-SPWebApplication to turn on anonymous access in SharePoint2010 web application using PowerShell, however it give me the following error (see the screenshot here): Add SharePoint ...
3
votes
2answers
736 views

Updating relative links and images in wiki library

I have a wiki library which contents is automatically copied onto another site. Some of the pages in the library contain images, the links to those images are relative. Example: page: ...
1
vote
1answer
1k views

When would you flush the cache of a SharePoint web application?

I stumbled upon this PowerShell script (source) to flush the cache of all SharePoint web applications. Write-Host -ForegroundColor White " - Enabling SP PowerShell cmdlets..." If ((Get-PsSnapin ...
3
votes
2answers
3k views

Enable feature of SharePoint sandbox solution

I have a .wsp file that is deployed to the remote server by powershell script. The solution is deployed successfully and I can see the solution feature in the site collection features, I can activate ...
3
votes
0answers
249 views

Filling a External Data field (BCS) in a list trough Powershell [duplicate]

I have a list of which one of the columns is of the "External Data" type, linked to a BCS service. We called this column "Organisation", and when I check the generated fields in powershell (with ...
2
votes
3answers
4k views

How to apply new page layout to all existing pages in a site?

I really need your help. I've created a new page layout in SharePoint Designer 2010 and I want to apply it to all existing pages in a site. Another thing to note, some subsites and pages use ...
6
votes
5answers
20k views

Editing property bag values using powershell

What is property bag in SharePoint 2010? How do I retrieve values from a property bag and get/set the values using powershell?
0
votes
1answer
263 views

ITem SharePoint-80 Not Found

I just installed SP2010. There's the default web app named SharePoint-80. I am trying to backup this web app using Power Shell. Here's my command: Backup-SPFarm -Directory C:\Backups -BackupMethod ...
2
votes
4answers
5k views

Restore-SPSite : Access Denied

Restore-SPSite : Access Denied You do not have permission to perform this action or access this resource. This is the error I get when trying to restore a Site Collection backup from the integrated ...
1
vote
2answers
732 views

null valued error in powershell scripting

Im trying to create a userprofile section but when i run the code Im gettiong the following error you cannot cal a method on a null valued expression.please help me out thanks in advance. ...
0
votes
1answer
6k views

Add users to SP Group

I am using following PS script to add users from a text file. Some of the users in the text file are inactive or gone (basically can't be resolved). The error message from the catch block is executed ...
2
votes
1answer
2k views

Problem retracting a Sharepoint 2010 Foundation solution

I am retracting a globally deployed solution via Central Administration. Here is the info Name: familycareprl.wsp Type: Core Solution Contains Web Application Resource: No Contains Global ...
2
votes
1answer
2k views

Powershell - Update column with managed-metadata

I have used following PS script to update a manage metadata column. Not sure how to go by updating a managed-metadata column. I know I need to only populate with "10;#Wholesale Agreement" in ...
0
votes
2answers
4k views

Enable-SPFeature Fails

I am trying to activate a feature using PowerShell Enable-SPFeature but receive the following error: Enable-SPFeature : The Feature is not a Farm Level Feature and is not found in a Site level ...
1
vote
3answers
2k views

Powershell Deployment - Enable-SPFeature Error

I get the following problem activating a feature in powershell: Enable-SPFeature : The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: ...
0
votes
2answers
1k views

Powershell - Error while exporting Term store

I'm trying to export the terms from the term store using PowerShell but I am receiving following error: This is the directory where you need to export the term set as a .csv file. Please ensure that ...
11
votes
4answers
7k views

How to automate entry of external column data in BCS?

I have a document library, Resumes, that has a large number of resumes in it. There is a regular column on that library, called EmployeeID, that is already populated. I have an external content type ...
1
vote
2answers
4k views

Export-spweb / Import-spweb leaves the lookup columns empty

The export / import operations seems to be working quite well except for lookup columns. The lookup columns and other columns associated with the lookup are all empty. Is this a limitation? Is there ...
1
vote
1answer
478 views

publish to office clients using Powershell

Is there a way to define the links to publish to office clients using Powershell? To do this action through the UI you would go through: Central Admin --> Manage Service Applications --> User ...
4
votes
1answer
1k views

How to import term sets to Managed Metadata Service using PowerShell and CSV file

How do I import a CSV file to metadata service using PowerShell? The CSV file has 500 rows and seven levels in it (Importing of term store).
1
vote
1answer
2k views

Powershell script to add local user to user profile

Lt me know if this is possible : i have around 100 local user and i want to add them to user profile.Can any on help me out to create scripts to add the user to user profile. Also i want the ...
0
votes
1answer
2k 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
4k 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
391 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
335 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
6k 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
3k 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
892 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
2k 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 ...
0
votes
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
409 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
272 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 ...