PowerShell - add a JPG into AD for the user photo

# Update-AD-Picture.ps1## copy a .jpg into a byte array, then push that into # the “thumbnailPhoto” property of the specified user in AD function UpDate-AD-Picture { param ([STRING] $UserName, [STRING] $JPEGfilePath)  if ( ($JPEGfilePath) -and (test-path($JPEGfilePath)) ) {   [BYTE[]] $JPEG = Get-Content $JPEGfilePath -encoding BYTE     $domain = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()   $root = $domain.GetDirectoryEntry()     $search = [System.DirectoryServices.DirectorySearcher]…

0