This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foreach ($group in $groups) { Write-Host " === $group == "; (Get-Culture).TextInfo.ToTitleCase((Get-ADGroupMember $group | Sort-Object -property Name | Select Name -ExpandProperty Name | Out-String -Width 100).ToLower()) } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bash error handler. | |
# On any error print full stack trace of the failure and exit with the original error code | |
# set -o errtrace | |
# inspired by https://gist.github.com/ahendrix/7030300 | |
set -Eeuo pipefail | |
function errexit() { | |
local err=$? | |
set +o xtrace | |
echo "Error in ${BASH_SOURCE[1]}:${BASH_LINENO[0]}." >&2 |
OlderNewer