Monday, January 7, 2019

SID to UserID, UserID to SID


This blog
https://community.spiceworks.com/how_to/2776-powershell-sid-to-user-and-user-to-sid

by SpoonerTech at Spiceworks was very helpful at going back and forth using powershell to and from a User Id or a SID #

Thanks,

Step 1: Domain User to SID

This will give you a Domain User's SID
$objUser = New-Object System.Security.Principal.NTAccount("DOMAIN_NAME", "USER_NAME")
$strSID = $objUser.Translate([System.Security.Principal.SecurityIdentifier])
$strSID.Value

Step 2: SID to Domain User

This will allow you to enter a SID and find the Domain User
$objSID = New-Object System.Security.Principal.SecurityIdentifier `
("ENTER-SID-HERE")
$objUser = $objSID.Translate( [System.Security.Principal.NTAccount])
$objUser.Value

4 comments:

  1. I want to read your blog. There is a lot of good information on this blog, I loved reading it and I think people will get a lot of support from this blog. Sam, I have written this kind of blog, you will get service & Support from this too. I hope you like my blog, Users will get a lot of information from this blog. I hope you get a lot of Fully support & help from this blog. For other information in the future.
    Arlo security camera



    ReplyDelete
  2. linksyssmartwifi.com is the offical website used to access the Linksys admin panel. If you did not get access the Linksys router using linksyssmartwifi.com. you can try accessing the Linksys router using 192.168.1.1.or contact Linksys Support at +1-844-456-4180 Toll Free Phone Number.

    ReplyDelete
  3. The most common problems which you may face with your refrigerator are when it does not cool appropriately, is slow in making ice or does not make ice at all, building up of frost, does not dispense water or ice, noisy or making clicking sounds, water leakage and so on. Top Rated Washer Repair Service in Riverside

    ReplyDelete
  4. Asphalt is very strong, durable and weather resistant in addition to being resistant to damaging effects from chemicals concrete floor sealer

    ReplyDelete