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.
The code samples utilize the following folder structure:
# Resize photos stored in the default PictureSource folder for Exchange On-Premises (648x648) and write images to user mailboxes
# 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'
# Resize photos stored in the default PictureSource folder for Active Directory (96x96) and write images to user thumbnailPhoto attribute
# Resize photos stored in the default PictureSource folder for Intranet (150x150)
This script gathers all public folders created during the last X days and exports the gathered data to a CSV file.
The script is not limited to legacy or modern public folders. It can be used with Exchange Server 2007/2010 and Exchange Server 2013/2016.
Use this script to identify users or departments creating to many folders in the public folder hierarchy. The CSV can be used to provide better guidance on public folder usage or can be used for planning public folder content migrations to other team based solutions (aka Shared Mailboxes, etc.)
# Query legacy public folder server MYPFSERVER01 for all public folders created during the last 31 days
.\Get-NewPublicFolders.ps1 -Days 31 -ServerName MYPFSERVER01 -Legacy
# Query modern public folders for all public folders created during the last 31 days
.\Get-NewPublicFolders.ps1 -Days 31
This scripts checks multiple Exchange Server 2013 OWA web.config files for existence of IMCertificateThumbprint and IMServerName Xml nodes required for Skype for Business OWA integration.
This mostly required after installing a new Exchange Server Cumulative Update.
IMServerName is the FQN of the Front End Pool
IMCertificateThumbprint is the certificate thumbprint of the Exchange OWA certificate
Exchange Server 2016 stores the IM information in Active Directory.
# Update all OWA web.config files to Skype for Business FE Pool myfepool.varunagroup.de and thumbprint
.\Set-OwaIMSettings.ps1 -FrontEndPoolFqdn myfepool.varunagroup.de -CertificateThumbprint "1144F22E9E045BF0BA421CAA4BB7AF12EF570C17"
Additional credits go to Juan Jose Martinez Moreno
This script copies files (.ps1, .cmd, .xml) from your scripts to a new target while persisting the directory structure.
The intention is to copy files from a script development or administrative system to a central (UNC based) file repository.
*.log files are excluded from being copied to the target directory.
Only new files and files changed during the last 180 days are copied.
# Copy all files using the parameter default
# Copy files from a dedicated source to a different destination folder
.\Copy-ScriptsToRepository -Source f:\Scripts -Destination \\MYSERVER\Scripts
This script helps administrators and support desk personnel to connect an Exchange Server 2013+ using remote PowerShell. You can either connect to a dedicated Exchange Server or connect to a randomly selected Exchange Server.
You can implement the function in your own scripts to connect to Exchange remotely. David Lee has written an excellent post about how to use saved credentials with PowerShell scripts.
# Connect to the specified server EX01
./Connect-ToExchange.ps1 -Server EX01
# Connect to a randomly selected server