Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Active Directory

Status
Not open for further replies.

digatle

Technical User
Oct 31, 2003
85
US
Is there a way that ASP can talk to Active Directory to find out who's birthday it is today? We have a field we use called info1 that has our members birthday in it because it's not a typical field in AD.

Digatle
 
Nice!! Now here's a crazy question for you.

I found this script that starts me on my path.

strComputer = "RemoteComputer"
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colComputer = objWMIService.ExecQuery _
("Select * from Win32_ComputerSystem")
For Each objComputer in colComputer
Wscript.Echo objComputer.UserName
Next

How do I write this as an ASP page?

Digatle
 
Here's an extensive thread that deals with ASP talking to Active Directory: thread774-356151

Take Care,
Mike
 
Nice thread Michael, anyway to simplify things a bit it shouldnt be hard to write it to asp either. Just take care of all the output you have the rest of the code should be same.
Instead of using Wscript.Echo should use the apropriate ASP command Response.Write
Code:
strComputer = "RemoteComputer"
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") 
Set colComputer = objWMIService.ExecQuery _
("Select * from Win32_ComputerSystem")
For Each objComputer in colComputer
 Wscript.Echo objComputer.UserName
Next

________
George, M
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top