I was just wondering how to create an OU in powershell. I'm trying to use this script. I want it to work without a domain so it can run on my schools computer.
$objOU = $objDomain.Create("organizationalUnit","ou=HR")
I keep getting this error.. But I don't know what to do, I've looked around a lot and can't really find what I need.
The following exception occurred while retrieving member "Create": "Unknown error (0x80005000)"
At :line:2 char:8
+ $objOU = <<<< $objDomain.Create("organizationalUnit","ou=HR")
- Marked as answer by Joson ZhouModerator Friday, May 28, 2010 7:35 AM