Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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
add comment

2 Answers 2

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 http://blog.falchionconsulting.com/index.php/2007/11/user-profile-properties/ or you can roll your own.

Here is a CodePlex project too: http://mossprofilereplicate.codeplex.com/

M

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: blog.falchionconsulting.com/index.php/2011/04/… –  Zhaph - Ben Duguid Dec 7 '11 at 13:05
add comment

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
add comment

Your Answer

 
discard

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.