We are working on a school project setting up windows server 2012 R2.
In the domain there are 70 users in multiple OU's. I've imported all the users with a csv file. Now the next step enabling all the users... At first we need to set a password, then enable the users.
I want to use a script in powershell and came up whith the next:
dsquery user| dsmod OU=All_Users,DC=LUMO,DC=local -p {Welkom01 |*}.
This results in the following error:
dsmod : Description: This dsmod command modifies existing objects in the directory.
At line:1 char:15
+ dsquery user| dsmod OU=All_Users,DC=LUMO,DC=local -p {Welkom01 |*}
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Description: T... the directory.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Can anyone please help?
And the next step is enable the accounts with:
Enable-ADAccount -Identity $user
Is that correct?