Modification date of user profile photo

Slawomir Zurawski 0 Reputation points


I'm downloading all users' photos once a day, using Get-UserPhoto. It's a dumb approach, thus time-consuming. Is there a way to check, when the picture has been uploaded? Has the object even got such a property? I'd like to process updated ones only.



Exchange Server
Exchange Server
A family of Microsoft client/server messaging and collaboration software.
817 questions
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
1,551 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Jarvis Sun-MSFT 8,076 Reputation points Microsoft Vendor

    Hi @Slawomir Zurawski ,


    As far as I know, the Get-userphoto command has no parameters to implement to check when the photo is uploaded, please refer to: Get-UserPhoto (ExchangePowerShell) | Microsoft Learn

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Limitless Technology 43,231 Reputation points
    Hello there,
    Perhaps something like this script might help you out in saving your time.
    $wmi = [WMI] ""
    $results = get-wmiobject Win32_UserProfile | foreach-object {
      $userAccount = [WMI] ("root/cimv2:Win32_SID.SID='{0}'" -f $_.SID)
      $userName = "{0}\{1}" -f $userAccount.ReferencedDomainName,$userAccount.AccountName
      new-object PSObject -property @{
        "Name" = $userName
        "LastUseTime" = $wmi.ConvertToDatetime($_.LastUseTime)
    $results | export-csv mycsv.csv -notypeinformation
    Similar thread here
    Hope this resolves your Query !!
    --If the reply is helpful, please Upvote and Accept it as an answer–
    0 comments No comments