Skip to content

Commit 244a902

Browse files
committed
Update object.psm1
1 parent 7776eed commit 244a902

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Modules/object.psm1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ Function New-AdministrationAccounts {
117117
$pwdLength = ($xmlParam | Where-Object { $_.translateFrom -eq '%pwdLength%' }).translateTo
118118
$pwdNANC = ($xmlParam | Where-Object { $_.translateFrom -eq '%pwdNonAlphaNumChar%' }).translateTo
119119

120+
$dbgMess += (Get-Date -UFormat "%Y-%m-%d %T ") + "---> Password Length.......................: $pwdLength"
121+
$dbgMess += (Get-Date -UFormat "%Y-%m-%d %T ") + "---> Number of non alpha numeric characters: $pwdNANC"
122+
120123
## if we got data, begining creation loop
121124
if ($xmlData)
122125
{
@@ -185,7 +188,7 @@ Function New-AdministrationAccounts {
185188
$Searcher = New-Object System.DirectoryServices.DirectorySearcher($DomainRootDN)
186189
$Searcher.Filter = "(&(ObjectClass=User)(sAMAccountName=" + $account.sAMAccountName + "))"
187190

188-
if ($null -ne $Searcher.FindAll())
191+
if ($Searcher.FindAll() -ne $null)
189192
{
190193
## Account is Present
191194
$dbgMess += (Get-Date -UFormat "%Y-%m-%d %T ") + "---> === " + $account.DisplayName + " already exists"

0 commit comments

Comments
 (0)