2
Reference page: Active Directory – Sample Scripts (Excel/VBA) While processing User Account put the following code in the beginning of operations to disable it. And enable it back once you’re successfully done. This way, in case of an unhandled exception that breaks execution of a script, any User Account that wasn’t properly processed will remain […] ...