Various fixes

This commit is contained in:
Ray 2024-04-12 21:12:06 +10:00 committed by GitHub
parent f1d4f15ef1
commit 0aa8bef540
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -22,7 +22,7 @@ echo $fpath
$fous = Import-Csv $fpath
#Create OU's within the Active Directory forest by looping throughout each row within the CSV file.
foreach ($row in $ouData) {
foreach ($row in $fous) {
# Get the name of the OU from the CSV
$ouName = $row.Name
@ -36,4 +36,6 @@ foreach ($row in $ouData) {
Write-Host "OU '$ouName' already exists, proceeding to next entry."
}
}
} else {
Write-Host "The specified CSV file does not exist."
}