Search for Disabled Users and Move to Disabled Ou using PowerShell Created this script to search a ‘OU’ for disabled users and move them to a different ou . I have added the ‘WhatIf’ option by default . Once you run the script it will prompt for ‘Search OU’ and ‘Target OU’ .
1 2 3 |
#Created to ease some of my daily tasks #web: http://thatlazyadmin.com #Twitter: shaun.hardneck |
1 |
Import-Module ActiveDirectory |
1 |
[void][Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic') |
…
Leave a Comment