Since Microsoft recently announced support for strong certificate mapping for Intune PKCS and SCEP certificates, identifying a user or computer’s security identifier (SID) is critical for troubleshooting. There are a few different ways to retrieve this information. Finding the user’s SID is easy enough (whoami.exe /user). However, finding the computer’s SID is a little more challenging.
PowerShell Script
To simplify the task of retrieving the SID for a user or computer, I’ve created and published a PowerShell script called Get-Sid. Administrators can install this script from the PowerShell gallery using the following command.
Install-Script -Name Get-Sid
Get-SID
After installing the PowerShell script, running it will return the SID of the current logged on user or the machine.
User
To retrieve the user’s SID, run the command without additional parameters.
Get-Sid
Computer
Run the command with the -Machine parameter to retrieve the computer’s SID.
Get-Sid -Machine