Friends Thanks in advance for you time !!!!!
I am creating managed accounts those are exists in AD, Those accounts contains special characters like $ < # " ! %.
My xml is as follows :
<ManagedAccount CommonName="testacoount1">
<Username>domain\TestAccount1</Username>
<Password>itor&123</Password>
</ManagedAccount>
<ManagedAccount CommonName="testacoount2">
<Username>domain\TestAccount2</Username>
<Password>itor<123</Password>
</ManagedAccount>
<ManagedAccount CommonName="testacoount3">
<Username>domain\TestAccount3</Username>
<Password>itor$123</Password>
</ManagedAccount>
<ManagedAccount CommonName="testacoount4">
<Username>domain\TestAccount4</Username>
<Password>itor!%#=123</Password>
</ManagedAccount>
I have updated xml as suggested for < as < and for & &
A problem is domain\TestAccount1 and domain\TestAccount2 are validated correctly but in script function "ValidateCredentials"
$dom = New-Object System.DirectoryServices.DirectoryEntry($currentDomain,$user,$password)
return null for TestAccount3 and TestAccount4.
I tired with C# code for user validation and it worked correct but not in powershell.
Please suggest the resolution.
I am creating managed accounts those are exists in AD, Those accounts contains special characters like $ < # " ! %.
My xml is as follows :
<ManagedAccount CommonName="testacoount1">
<Username>domain\TestAccount1</Username>
<Password>itor&123</Password>
</ManagedAccount>
<ManagedAccount CommonName="testacoount2">
<Username>domain\TestAccount2</Username>
<Password>itor<123</Password>
</ManagedAccount>
<ManagedAccount CommonName="testacoount3">
<Username>domain\TestAccount3</Username>
<Password>itor$123</Password>
</ManagedAccount>
<ManagedAccount CommonName="testacoount4">
<Username>domain\TestAccount4</Username>
<Password>itor!%#=123</Password>
</ManagedAccount>
I have updated xml as suggested for < as < and for & &
A problem is domain\TestAccount1 and domain\TestAccount2 are validated correctly but in script function "ValidateCredentials"
$dom = New-Object System.DirectoryServices.DirectoryEntry($currentDomain,$user,$password)
return null for TestAccount3 and TestAccount4.
I tired with C# code for user validation and it worked correct but not in powershell.
Please suggest the resolution.