By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,219 Members | 2,242 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,219 IT Pros & Developers. It's quick & easy.

Walkthrough: Adding Active Directory Objects

P: n/a
I am trying to get the example in this help topic to work

The only change that I have made is :

entryPc.Path = "WinNT://" + Environment.UserDomainName + "/" +
Environment.MachineName
because I did not know my domain name (which seems to be the same as
my machine name)

The program throws an exception on
For Each child In entryPC.Children

The exception is

An unhandled exception of type
'System.Runtime.InteropServices.COMException' occurred in
system.directoryservices.dll

Additional information: The group name could not be found

Does this only work for some networks or is the example wrong?/

Jack Russell
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Its ok I got it to work by taking out the domain name (I am sure that I
tried that before)

Jack Russell wrote:
I am trying to get the example in this help topic to work

The only change that I have made is :

entryPc.Path = "WinNT://" + Environment.UserDomainName + "/" +
Environment.MachineName
because I did not know my domain name (which seems to be the same as
my machine name)

The program throws an exception on
For Each child In entryPC.Children

The exception is

An unhandled exception of type
'System.Runtime.InteropServices.COMException' occurred in
system.directoryservices.dll

Additional information: The group name could not be found

Does this only work for some networks or is the example wrong?/

Jack Russell

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.