Translate get-spuser SID from different domain to username

sco gordo 301 Reputation points
2020-11-21T01:25:55.363+00:00

Get-SPuser turned up
contoso2\S-1-3-12-12451234567-1234567890-1234567-1434
How can I translate this into a user name/identity?
Server I'm working from is on contoso1. There is a trust. Tracked down name of contoso2 server to dcserver.contoso2.com.
Tried
Get-Aduser 'S-1-3-12-12451234567-1234567890-1234567-1434' -Server 'dcserver.contoso2.com'
But got
"Ether the target name is incorrect or the server has rejected the client credentials.
Thanks

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,515 questions
SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,943 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. MotoX80 33,481 Reputation points
    2020-11-21T14:08:37.18+00:00

    If the account still exists, you can use Psgetsid.

    https://learn.microsoft.com/en-us/sysinternals/downloads/psgetsid

    0 comments No comments

  2. MichaelHan-MSFT 18,031 Reputation points
    2020-11-23T07:06:29.307+00:00

    Hi @sco gordo

    As far as I know, when we run the command Get-SPUser, it should return the display name of the user. What's the display name of that user? Does it also show the sid?

    Besides, if get-aduser not works, could it be a group in contoso2 server? You could try the command get-adgroup 'S-1-3-12-12451234567-1234567890-1234567-1434'. Maybe it would work for you.


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.