Tuesday, 20 June 2017

Update your photo with powershell for windows Outlook/Lync/Skype-for-business/etc

NOTE: See my following post which does not required the Remote Server Administration Tools to be installed.

Thanks to the EZ IT guy who writes explaining that by installing the Remote Server Administration Tools for Windows 10 (or Windows 7 if you need it) you can then read your windows domain thumbnail photo picture.jpg like this:

$record = Get-ADUser $ENV:USERNAME -Properties thumbnailPhoto
$record.thumbnailPhoto | Set-Content "picture.jpg" -Encoding byte

And, provided that your photo is less that 100K you can also upload it:

Set-ADUser $ENV:USERNAME -Replace @{thumbnailPhoto=([byte[]](Get-Content "picture.jpg" -Encoding byte))}

All this requires that you be logged into your domain. Also thanks to the WOSHUB for help simplifying it.

If only there were a way that didn't require installing Remote Server Administration Tools.

Also some talk here from heyscriptingguy.

1 comment:

  1. To discover out our high on line casino for this month head to our toplist. There are quantity of} varieties of|several varieties of|various varieties of} slot video games obtainable, every with distinctive features such as pot bursts, wild multipliers, and totally different sorts of jackpots. Lock in a win half in} Lock It Up – Dragon Fire™ and Legend 솔카지노 of Nian™. This exciting series highlights a free video games characteristic that is triggered by six or more gold symbols. Capture a gold image in a red body and a 500x or 750x complete wager is awarded.