Great script. I did run into a small issue when trying to create the workstation and server objects.
When using the -CreateADLabWindowsWorkstations or -CreateADLabWindowsServers switches, the script runs without any errors, but no computer accounts are actually created.
It looks like the parameter names defined earlier in the script do not match the variable names being checked later on.
The parameters are defined as:
-CreateADLabWindowsWorkstations
-CreateADLabWindowsServers
However, the script is checking these variables, where “Windows” is missing:
$CreateADLabWorkstations
$CreateADLabServers
I changed this to fix the issue.
Line ~1434 - change from:
IF ($CreateADLabWorkstations -eq $True)
to:
_IF ($CreateADLabWindowsWorkstations -eq $True)_
Line ~1439 - change from:
IF ($CreateADLabServers -eq $True)
to:
IF ($CreateADLabWindowsServers -eq $True)