From 26f0fc6ef372f1f98d6ab07a49296191774e0900 Mon Sep 17 00:00:00 2001 From: reiyua Date: Fri, 12 Apr 2024 19:14:03 +1000 Subject: [PATCH] Add credit for checking if AD user already exists --- AutoUserADCreator.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/AutoUserADCreator.ps1 b/AutoUserADCreator.ps1 index 4baf43f..ea27072 100644 --- a/AutoUserADCreator.ps1 +++ b/AutoUserADCreator.ps1 @@ -42,6 +42,7 @@ ForEach ($user in $fusers) { } # Check if user already exists within OU. Skip if so with message stating so. (RAYYAN Contribution) + # Source for code (https://morgantechspace.com/2016/11/check-if-ad-user-exists-with-powershell.html) if (Get-ADUser -Filter "SamAccountName -eq '$fname.$lname'") { Write-Host "User $fname.$lname already exists. Skipping." } else {