Getting User Photos

I need to do this quite often for presos for some unknown reason. Getting photos out of AD was a pain until I spent an hour rigging this up.

Run these from PowerShell (right click on the Start button, Windows PowerShell)

This command will open a little window, perfect for previewing or taking as a screenshot

Connect-AzureAD
$username="lsmith"
Get-AzureADUserThumbnailPhoto -ObjectId "${username}@interactive.com.au" -View $true

This one will export it to a folder in your home directory called UserProfilePics (which I have premade - mkdir "${HOME}\UserProfilePics" if you haven't)

Connect-AzureAD
$username="lsmith"
Get-AzureADUserThumbnailPhoto -ObjectId "${username}@interactive.com.au" -FileName ${username} -FilePath  "${HOME}\UserProfilePics"

To give you some idea of the insanity that this can result in you can see a little something I whipped up artistically in my spare time. Strongly recommend rotating 30 odd degrees and doing this for a healthy bout of zingerism.

Scenario 1: Across columns

Don't do anything too inappropriate - with great power comes great responsibility.