Link to home
Start Free TrialLog in
Avatar of bryanford
bryanford

asked on

Return FQDN of machine

Hi all,

I am hoping to return the FQDN of the computer running this win app.

Environment.MachineName just doesn't cut it :)

Anyone got a solution?

Bryan
Avatar of graye
graye
Flag of United States of America image

Hummm.... so what were you expecting as an answer?

Something like:   CN=MACHINE12,CN=Workstations,DN=SomeDomain,DN=Com

or just:        Machine12.SomeDomain.Com

I'd recommend an LDAP query against the domain to get either answer
Avatar of bryanford
bryanford

ASKER

I dont think an LDAP query would do the job because of what happens. This app will be run on a few different machines on different forests and i dont want to hard code any domain settings anywhere.

I am just after something like Machine12.somedomain.com

The environment.machinename only gives you Machine12
SOLUTION
Avatar of graye
graye
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks guys,

Both return what I am after however the shortest code wins the majority of points :)

Thanks for that

Bryan