PowerShell-Scripts
PowerShell-Scripts copied to clipboard
Adding OU targeting
I added an optional parameter to the Send-AllNotices called AD_TargetOU. This string accepts a CN and will limit the user object search down to that OU and all subsequent OU's in the subtree. It uses the -SearchBase parameter of Get-ADUser. This, combined with the exclusion list, should broaden the targeting ability of the script enough for most use cases.