Sean Hussey wrote: > seanhussey: > dn: uid=seanhussey,dc=company,dc=com > anotherattr: 39392:12341 > > Etc, for every user. Although I write a hash to the file, when it all > comes out, it's a bunch of arrays. Trying to access pieces of data by > their name doesn't work. > ... > How do I get to user[:uid], user[:anotherattr] and user[:dn] ? Why not use the YAML library to produce the file as well as consume it? require 'yaml' require 'win32ole' domain = WIN32OLE.connect("WinNT://mydomain") users = {} domain.each do |obj| if obj.Class == "User" users[obj.Name] = { :ads_path => obj.AdsPath, :guid => obj.Guid } end end y users Output: --- Guest: :guid: "{D83F1060-1E71-11CF-B1F3-02608C9E7553}" :ads_path: WinNT://MSHOME/TELPERION/Guest Administrator: :guid: "{D83F1060-1E71-11CF-B1F3-02608C9E7553}" :ads_path: WinNT://MSHOME/TELPERION/Administrator Dave: :guid: "{D83F1060-1E71-11CF-B1F3-02608C9E7553}" :ads_path: WinNT://MSHOME/TELPERION/Dave .... Cheers, Dave