Something which popped up in discussion forums so I thought I would mention the issue and workaround here. Consider this a KB article for Microsoft PowerShell:
Getting the following error when trying to bind to an Active Directory (AD) object with Windows PowerShell 1.0.
out-lineoutput : Exception retrieving member “ClassId2e4f51ef21dd47e99d3c952918aff9cd”: “An invalid dn syntax has been specified.”
Bind with the current credentials and default domain controller (DC) fails.
Use explicit bind to a domain controller. If that does not help try explicitly specifying administrative credentials.
In case you are using AD cmdlets this can for example be done by running the following before other cmdlets:
Connect-QADService -Service 'dc1.company.com'
Connect-QADService -Service 'dc1.company.com' -Credential ( Get-Credential )
Then proceed with other commands such as Get-QADUser, etc.
- Windows 2003 Active Directory
- Windows PowerShell 1.0
- Both AD cmdlets and native PowerShell [ADSI] support