4 Replies Latest reply on Feb 11, 2016 10:52 AM by Zsoldier

    Username in Events

    Zsoldier Expert
    vExpert

      Two questions:

      1. VMware - Any plans to capture UPN of user rather than classic netbios\username?
      2. Anyone know of a way to convert domain netbios name to it's equivalent DNS name?

       

      The issue I'm running into is w/ several vCenters and several different domains now.  The script I use captures the username from events and uses that to search for their e-mail address.  Problem now is that some people have multiple accounts on multiple domains, so only one will have a valid email associated.

       

      Since I'm running script under context of one domain, I can no longer simply just parse out the username w/ the get-aduser cmdlet.  Soooo, yeah, that's where I'm at.  Any thoughts/ideas?

        • 1. Re: Username in Events
          LucD Guru
          User ModeratorsvExpertCommunity Warriors

          1) +1, but in a new property please. Otherwise a lot of existing scripts will fail

          2) Does this help ?

          From the Name and DNSRoot you should be able to compose the full DNS name

           

          Get-ADDomain | Select Name,NetBIOSName,DistinguishedName,DNSRoot

           

          Blog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz
          • 2. Re: Username in Events
            Zsoldier Expert
            vExpert

            Ahh, yeah.  That looks like it will work.  I'm able to pass that cmdlet the netbios name and get the domain information I'm looking for.  Thanks LucD!

             

            So it would look something like this:

            get-aduser -server (get-addomain NETBIOSNAME).infrastructuremaster "usernameinthatdomain"

            • 3. Re: Username in Events
              LucD Guru
              Community WarriorsUser ModeratorsvExpert

              Not sure if you can do this cross-forest, but you can always do a remote session

              Blog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz
              • 4. Re: Username in Events
                Zsoldier Expert
                vExpert

                it appears to work as long as a trust is in place.  Luckily for my scenario, there is one, so this'll work as a stop gap for me.