Win32 - ADSI

is there a way I can use ADSI with ruby on win32?

Sure. First, here’s how to talk to a WinNT domain:

irb(main):001:0> require 'win32ole’
true
irb(main):002:0> WIN32OLE::VERSION
"0.4.5" # older versions don’t support connect with a moniker
irb(main):006:0> ntuser = WIN32OLE.connect(“WinNT://CORPORATE/ChrisM,User”)
#WIN32OLE:0x2ab21b0
irb(main):007:0> ntuser.name
"ChrisM"
irb(main):014:0> ntuser.fullname
"Morris, Chris"

Here’s ADSI:

irb(main):003:0> ads =
WIN32OLE.connect(“LDAP://dc=portaldev,dc=snelling,dc=com”
)
#WIN32OLE:0x2abab28
irb(main):008:0> ads.name
"dc=portaldev"

(I’m rusty on ADSI, so can’t think of what else to do with that connection
… but it’s a start :slight_smile:

Chris