
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
Additional Information
Get-Sid in the PowerShell Online Gallery
Enterprise PKI with Microsoft Active Directory Certificate Services











Ducku
/ October 28, 2026Useful script thank you. Your syntax is incorrect on here though, I imagine you updated something at some stage – for machine SID it should be
-SidType Machine
Richard M. Hicks
/ October 30, 2026You’re right. I think I changed the command syntax at some point. 🙂