Skip to content

Commit

Permalink
Fixed incorrect exception message.
Browse files Browse the repository at this point in the history
Fixed incorrect exception message, updated comments.
  • Loading branch information
KevOtt committed Aug 21, 2018
1 parent ea83835 commit b8fec1e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Generate AD Lab.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
or to add only the role groups into access groups, so no users are placed into access groups, run
with the switch "CleanRoles".
For now, the tool will only create all groups and users in a single OU or CN. If none is specified,
all objects will be created in the Users Container by default; otherwise specify the Distinguished Name
of an existing OU or CN for the argument "TargetLocation".
For now, the tool will only create all groups and users in a single OU or CN. All objects will be
created in the Users Container by default; otherwise specify the Distinguished Name of an existing
OU or CN for the argument "TargetLocation" to create all objects in that location.
.EXAMPLE
& '.\Generate AD Lab.ps1' -Domain 'Example.com'
Populates objects into the Users Container of the domain "Example.com", with the default setup.
Expand Down Expand Up @@ -69,6 +69,7 @@
Version: 1.0
Date: 8/20/2018
Author: Kevin Ott
#Requires -Version 3
.LINK
https://github.com/KevOtt/AD-Lab-Generator
#>
Expand Down Expand Up @@ -107,7 +108,7 @@ TRY{
.($ScriptDir + '\Functions\Query-ADObject.ps1')
}
CATCH{
throw ('Unable to locate file dependent file: ' + $_.Exception)
throw ('Unable to locate dependent file: ' + $_.Exception)
}

Write-Output 'Starting AD Lab Generation'
Expand Down Expand Up @@ -323,7 +324,7 @@ $UserNames | ForEach-Object{

<#
Not going to bother checking for existing accounts, since they are randomized it should be a small
chance to have an existing account and failures should not cause further problems unlike groups.
chance to have an existing account and failures should not cause further problems like groups.
#>

# Create AD User
Expand Down Expand Up @@ -375,5 +376,4 @@ if($ExportPasswords -eq $true){
$PasswordsOut | Out-File -FilePath $p
}

Write-Output 'AD Lab Genernation has completed successfully'

Write-Output 'AD Lab Genernation has completed successfully'

0 comments on commit b8fec1e

Please sign in to comment.