File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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"
You can’t perform that action at this time.
0 commit comments