Archive for June, 2011

Download all the Profile Pictures through Powershell using Web Service

June 3, 2011 1 comment


I got a request from my client to download all the profile pictures of users which is needed for some other team. We don’t have time to write code & move it to production that fast. Hence we are left with the option to download through webservice. Rest goes like this…

You can download the pictures based on the user rights who is downloading. Say if the user has ‘Manage Profiles‘ right on User Profile Service Application then you can browse the profiles by index. By using the approach you need to use ‘NextValue’ provided by ‘GetUserProfileByIndexResult’.  A better explanation is is given here

You can download the powershell script here

The second option is if you don’t have rights on User Profile Service Application, which means you will not be able to use the method ‘GetUserProfileByIndex‘. In this case you need to have list of account names for which you need to download the pictures.

And the same can be downloaded from here

I wanted to use powershell because easy to execute & modify, no compilation is needed and any can see the code so less review effort. This time it was interesting to learn how to use webservices in powershell.

Categories: Uncategorized