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
296 views

Edit SharePoint 2007 Profile PersonalSite by code?

Does anyone know how to programmatically change the Personal Site field in their SharePoint Profile programmatically? I can do it via the GUI on the SSP server, but that takes an unacceptable amount ...
0
votes
2answers
778 views

Feature Upgrade Retract Deploy Power Shell Commands

I have heard that one way that you can upgrade a feature in SharePoint with new files is to do a retract deploy. I believe this is what Visual Studio 2010 does when you do a Deploy. What are the Power ...
2
votes
4answers
6k views

Delete a large number of documents from a site

Can anyone tell me the quickest way to delete a large number of documents from a site library if you are an administrator for the site? Any powershell commands?
1
vote
1answer
538 views

OleDbDataAdapter Powershell Connecting to Sharepoint List

I have a situation where I can retrieve results using this query Select * From myList (myList being Sharepoint list) but cannot get results from this select First From myList Where First=JoeBob ...
2
votes
2answers
5k views

How to read items in a BCS external list with PowerShell?

Is there a way that you get information from an external list (created from SPD for a specific ECT) differently than you do from a "normal" SharePoint list when using PowerShell? I did the following: ...
4
votes
2answers
1k views

How to modify a list's template?

I have a list that was created from a Custom List template. Most users have been interacting with it through a calendar view that was created. Now, some users would like to connect this list to their ...
6
votes
1answer
1k views

Adding a list item with PowerShell doesn't trigger event receiver

I have a simple list with an event receiver for the following events: ItemAdded ItemUpdating ItemDeleting I confirmed that the event receiver fires when adding/updating/deleting an item from the ...
2
votes
2answers
2k views

Powershell backup/restore or import/export to keep all document versions?

I need to move a test SharePoint 2010 site collection and database to a new server (and new database). I want to make sure that I keep user security and all document versions. Does backup/restore keep ...
9
votes
1answer
6k views

All Authenticated Users claim

I'm adding items to my list by powershell script. I need to fine-grain user permissions to added items. Code I'm using now: $claim = New-SPClaimsPrincipal -ClaimValue $role -ClaimType $ROLE_CLAIM ...
0
votes
1answer
594 views

Empty exception using powershell to add a masterpage

When i try to add a masterpage to a web application using the following code : $MasterPage = "C:\test.master" $MasterPageName = [System.IO.Path]::GetFileName($masterpage); $SpWebApp = ...
8
votes
4answers
6k views

Problem with HTTP Handler deployed on Sharepoint 2010

I've developed a Visual Web Part for Sharepoint 2010. I've used VS2010 to do that and tested the Webpart in a testing server using VS to do the deployment. But to deploy it on the production server I ...
7
votes
5answers
40k views

List all Site Collections in a Farm

I want to be able to see the number, names, url of all site collections there are in a given farm. Would there be a powershell command to do that?
0
votes
1answer
1k views

PowerShell Attempted to perform an unauthorised operation

I'm trying to add a term store administrator using PowerShell. I'm logged on to one of the farm web servers with a farm administrator account (also happens to be a domain admin account too). I'm ...
1
vote
3answers
3k views

SharePoint 2010 - Enable farm scope feature via powershell

I have deployed a solution with farm scope feature. I am able to activate / deactivate feature via "Manage Farm feature". I want to do this via power shell : When i try to activate feature ...
1
vote
2answers
720 views

SharePoint 2010 - Find WebPart in WebApplication

I´m searching for an good way to find the ContentQuery WebPart in my WebApplication. My plan is to write a PowerShell script and create a url list. I found the following possible ways: SharePoint ...
4
votes
2answers
3k views

Is there a PowerShell cmdlet to delete a Timer Job?

Is there a PowerShell cmdlet to delete a Timer Job in SharePoint 2010?
1
vote
3answers
1k views

Error while import resource file Business Data Connectivity

I am trying to use powershell for importing a resource file in Business Data Catalog but I keep getting the following error Import-SPBusinessDataCatalogModel : The root element of a valid Metadata ...
6
votes
2answers
5k views

Powershell error when trying to hook into UserProfileConfigManager

I am making the following call new-object Microsoft.Office.Server.UserProfiles.UserProfileConfigmanager($servercontext) And get the following error: New-Object : Exception calling ".ctor" with ...
0
votes
1answer
379 views

Create new user profile property from powershell

I have been trying to create a new user profile property using powershell, without any luck. I have been reading up about User Profile service cmdlets but I keep getting an error saying the cmdlet is ...
2
votes
1answer
4k views

Does Update-SPSolution trigger a SPFeature.Upgrade()?

I'm looking into Feature versioning and upgrading in SharePoint 2010 and I don't know exactly if the Update-SPSolution cmdlet triggers a SPFeature.Upgrade(). Are <UpgradeActions> elements ...
2
votes
5answers
12k views

Enable-SPFeature not working

I am using PowerShell script to deploy and activate a feature in the same script. Everything works fine and I can see my feature in the Sharepoint Root folder (14 hive). I run it using Farm Admin. ...
2
votes
1answer
1k views

Powershell script for adding imported user profiles to SP group?

I've managed to import user profiles from our AD. Now I want to add all the imported user profiles into a specific SharePoint group, let's say Visitors, and doing this by using the People Picker takes ...
6
votes
4answers
12k 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
781 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 ...
7
votes
5answers
23k 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
272 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
759 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
3k 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
8k 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
5k 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
500 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
3k 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
404 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: ...