No announcement yet.

Finding a computer SID

  • Filter
  • Time
  • Show
Clear All
new posts

  • Finding a computer SID

    Does anyone know how I can find the SID of a computer in Active Directory?

    Iíve searched the Net for a script so I can run a query but I cant seam to find anything anywhere.

  • #2
    Re: Finding a computer SID

    This might help you...PSGetSid from sysinternals.


    • #3
      Re: Finding a computer SID

      Yeh, cheers but I already have this. This will only give me the SID for a PC on the network as It connects to the PC to retrieve the SID.

      I need to see what SID AD has stored for a specific PC, so I'd need to connect to AD rather than the machine its self.


      • #4
        Re: Finding a computer SID

        Try installing ADSIedit. I think the attribute is objectSID.


        • #5
          Re: Finding a computer SID


          If adsiedit does not work for you, there is another possibility. Download adfind and try the following:

          C:\Scripts>adfind -b "CN=computername,OU=ou_name,OU=ou_name,OU=ou_name,dc=contoso,dc=com" -f "(&(objectcategory=computer))" objectsid

          - -b is the baseDN where to search for specific objects.
          - -f filter, check also in adsiedit for attribute names.
          - "(&(...)" ldap query. Needs to be quoted, otherwise it will not work.
          - objectsid, this is the attribute that will be returned.
          - rename all italic values, to you own infrastructure.

          Hope this will help you.