Commit 3b13ea60 authored by CRAIG BENNER's avatar CRAIG BENNER

Enabling Account that is created in ONEForest Role

parent 399dd7c7
......@@ -26,8 +26,9 @@ function createUser([String]$inUserName, [String]$inDN, [String]$inPassword)
$user = Get-ADUser -filter {name -eq $inUserName}
if ($user.Name -ne $inUserName) {
$securePassword = ConvertTo-SecureString $inPassword -AsPlainText -Force
$securePassword = ConvertTo-SecureString $inPassword -AsPlainText -Force
New-ADUser $inUserName -Path $inDN -AccountPassword $securePassword
Enable-ADAccount $inUserName
......@@ -125,4 +126,4 @@ catch {
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment