Website-Icon Granikos GmbH & Co. KG

Add Resized User Photos Automatically

Last updated 2018-08-14

Description

This script has been developed for a custom project with the following requirements:

The script utilizes a self developed C# command line tool, which has been published as open source at GitHub. The ResizeImage Wiki explains the usage of the command line tool. The application’s configuration controls the target size and an optional pixel-based offset.

Maybe the script will be useful in your project as well.

Requirements

Examples

The code samples utilize the following folder structure:

Code Samples

# EXAMPLE
# Resize photos stored in the default PictureSource folder for Exchange On-Premises (648x648) 
# and write images to user mailboxes

.\Set-UserPictures.ps1 -ExchangeOnPrem   

# EXAMPLE
# Resize photos stored on a SRV01 share for Exchange Online and save resized photos on a SRV02 share


.\Set-UserPictures.ps1 -ExchangeOnline -PictureSource '\\SRV01\HRShare\Photos' -TargetPathExchange '\\SRV02\ExScripts\Photos' 

# EXAMPLE 
# Resize photos stored in the default PictureSource folder for Active Directory (96x96) 
# and write images to user thumbnailPhoto attribute 

.\Set-UserPictures.ps1 -ActiveDirectory

# EXAMPLE
# Resize photos stored in the default PictureSource folder for Intranet (150x150)

.\Set-UserPictures.ps1 -Intranet

Version History

Links

Follow

Kurz-URL | Short URL: https://granikos.eu/go/rRQN
Die mobile Version verlassen