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

When I use the UserProfileManager I get all the profiles when using .GetEnumerator() and looping thru them all with foreach($profile in $AllProfiles). After the loop I can get PropertyConstants like AccountName and workEmail etc. What I'm wondering now is that if there is any easy way to add all the users I get to a SP group? I asked a similar question earlier (Powershell script for adding imported user profiles to SP group?) but I still haven't solved it. The reason I want to add all the users into a group is because I'm using a web part called PeopleZen from Roxority which displays all the users I have in my Sharepoint environment except the ones in AD groups, it's like these aren't recognized by the web part and therefor they don't show. The only way for me to display the user profiles with photos etc. is to add the users to a SharePoint group and after they've been added they show up in the web part. I'm doing it so I can use the web part to display certain departments in my organization thru a filter. Maybe there's an easier way for me to do this but atm this is the best solution I can come up with. Any tips or pointers are really appreciated!

share|improve this question
1  
I really wouldn't do this. It is a bit of a bad solution, and then you would have to do it on every site collection that uses the web part, and you would have to find a way to identify new users in the future to add them in. Can you instead use the People Search Results WP to display people based on user profile attributes? I've used that for employee directory purposes or to list a department's members. –  Mike Oryszak Nov 8 '11 at 14:42
    
Thx for the suggestion, I'll check it out as soon as I can. And I understand the things you bring up making it a bad solution but being inexperienced with both Sharepoint and programming this was about the "best" I could come up with at the moment. –  K.W Nov 8 '11 at 15:03

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.