Quantcast
Channel: autospinstaller Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 1245

Created Unassigned: System.DirectoryServices.DirectoryEntry($currentDomain,$user,$password) return null for password Characters $

$
0
0
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&amp;123</Password>
</ManagedAccount>
<ManagedAccount CommonName="testacoount2">
<Username>domain\TestAccount2</Username>
<Password>itor&lt;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 &lt; and for & &amp;
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.

Viewing all articles
Browse latest Browse all 1245

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>