SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a PowerShell or other mechanism that I can use to export out the custom property definitions from the Manage User Properties page in Central Admin from one environment to another?

I know I can add them all manually, but as that's error prone and likely to take a bit of time I wondered if there was a better way?

share|improve this question

Yes, you can use PowerShell to export the definitions and then import them back in to another environment. Gary Lapointe has some examples for 2007 or you can roll your own.

Here is a CodePlex project too:


share|improve this answer
I've used PowerShell to dump out user profile properties from one SP2010 farm into an xml which I then used to import into a second SP2010 farm. It's actually very simple to do, you just need to make sure you grab the correct properties. – shufler Dec 6 '11 at 23:21
@shufler - Do you have any further details on this? I'm quite keen to look into the PS options here - Gary's option appears to use a custom stsadm command as far as I can tell (I could be wrong, but it doesn't look like there's any PowerShell in there) and I thought stsadm was pretty deprecated in 2010? – Zhaph - Ben Duguid Dec 7 '11 at 13:01
Looks like this post is closer to what I need:… – Zhaph - Ben Duguid Dec 7 '11 at 13:05

I've previously used Darko Milevski's post about deleting profiles with PowerShell as a reference for accessing the user profile service properties.

The relevant bits are the lines:

$DisplayName = $profile.DisplayName  
$AccountName = $profile[[Microsoft.Office.Server.UserProfiles.PropertyConstants]::AccountName].Value  

Some properties are available from the UserProfile $profile object (display name) and others (all I believe) can be accessed with the property constants (AccountName). You can look up the property names in the UPA to get the properties you need (in your case, since it's custom you probably already know the property name).

To import, you reverse the process.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.