Windows Server 2008: PowerShell Script adding Active Directory Users
Uploader Comments (technoblogical)
All Comments (11)
-
I am working first time on Powershell and i found this same script for MCTS self paced training KIT. However i am getting this following error:
Unexpected token 'user","CN=Mary' in expression or statement.
At C:\Users\Administrator\Desktop
\vb.ps1:2 char:39 + $objUser=$objOU.Create("user",
"CN=Mary <<<< North") + CategoryInfo : ParserError: (user","CN=Mary:String) [], ParseException + FullyQualifiedErrorId : UnexpectedToken I am pretty sure i making some basic mistake.
-
@Designandrew It helps if you receive a list of 100 users in an Excel document. You can use concatenating and save it as a power shell script... run a single file and 'poof', you have your 100 users in less than a minute!
-
NICE PS ROCKS!!!
-
I would recommend using the ActiveDirectory Cmdlets from the AD Module. They are much easier to work with.
-
че за хуйня?))
-
If you're using Server 08 R2, the "New-ADUser" util is much easier. For details, bing technet article ee617253
-
what does this thing really do?... im wondering.
-
The advanced settings checkbox in the Active Directory Users and Computers mmc was just what I was looking for. Thanks!
ok this is great, but why do it using powesehell? why not just do it straight from AD? I'm just trying to understand the use of this?
Designandrew 2 months ago
@Designandrew Yeah, I pretty much felt the same way originally, but this is basic building block stuff. It leads to making an applet or program so that you can do this without opening AD. That's really the only way I can make sense of it. I kinda feel the same way about the command line stuff as well.
technoblogical 2 months ago