Richard M. Hicks Consulting, Inc.

Enterprise Mobility and Security Infrastructure | Microsoft Entra Private Access, Always On VPN and DirectAccess, Absolute Secure Access, Certificates and PKI
  • Consulting
  • Always On VPN Book
  • DirectAccess Book
  • Training
  • About Me
  • Contact
  • Awards

    Microsoft Most Valuable Professional (MVP)

    Enterprise Mobility Consulting Services
    • X
    • Facebook
    • LinkedIn
    • GitHub
    • YouTube
    • Reddit
  • Techmentor 2025

    Techmentor IT Pro Training Microsoft HQ 2025
  • Consulting

    Richard M. Hicks Consulting, Inc.
  • Pluralsight

    Video training courses on Pluralsight
  • Newsletter

    Richard M. Hicks Consulting, Inc. Enterprise Mobility Newsletter
    • 6to4
    • AADJ
    • Absolute
    • Absolute Secure Access
    • Absolute Software
    • Active Directory
    • Active Directory Certificate Services
    • AD CS
    • ADC
    • ADCS
    • Admin Center
    • administration
    • Always On VPN
    • Always On VPN Book
    • Always On VPN DPC
    • AMA
    • Amazon EC2
    • Amazon Web Services
    • AOVPN
    • AOVPN Book
    • AovpnDPC
    • application delivery controller
    • Application Filter
    • authentication
    • AWS
    • Azure
    • Azure Active Directory
    • Azure AD
    • Azure AD Join
    • Azure App Proxy
    • Azure Application Gateway
    • Azure Application Proxy
    • Azure Conditional Access
    • Azure Load Balancer
    • Azure MF
    • Azure MFA
    • Azure Traffic Manager
    • Azure Virtual WAN
    • Azure VPN
    • Azure VPN Gateway
    • BIG-IP
    • CBA
    • Certificate Authentication
    • Certificate Authority
    • Certificate Connector for Intune
    • Certificate Services
    • Certificate-Based Authentication
    • certificates
    • Cisco
    • Cisco Umbrella
    • Cisco Umbrella Roaming Client
    • Citrix ADC
    • cloud
    • Cloud PKI
    • Cloud Service
    • Cloudflare
    • Community
    • Compliance
    • Conditional Access
    • Conference
    • Consulting Services
    • Cryptography
    • CVE
    • Deployment
    • Device Management
    • device tunnel
    • DirectAccess
    • DirectAccess Book
    • DirectAccess Deprecated
    • DirectAccess End of Life
    • DirectAccess EOL
    • Discord
    • DNS
    • DNS Policies
    • DPC
    • Dynamic Profile Configurator
    • EAP
    • EC2
    • ECC
    • education
    • Elliptic Curve Cryptography
    • encapsulation
    • Encryption
    • end of life
    • Endpoint Manager
    • Enterprise
    • enterprise mobility
    • Entra
    • Entra CBA
    • Entra Certificate-Based Authentication
    • Entra Conditional Access
    • Entra Global Secure Access
    • Entra ID
    • Entra Internet Access
    • Entra Private Access
    • Entra Private Network Connector
    • EOL
    • Event
    • extensible authentication protocol
    • F5
    • force tunnel
    • force tunneling
    • Forefront TMG 2010
    • Forefront UAG 2010
    • Forum
    • General
    • Geographic Redundnacy
    • GitHub
    • Global Secure Access
    • global server load balancer
    • Group Policy
    • GSA
    • GSLB
    • HAADJ
    • High Availability
    • Hotfix
    • Hybrid Azure AD Join
    • Hybrid Entra ID Join
    • Hybrid Entra Join
    • IKEv2
    • iManage
    • Important Links
    • Infrastructure
    • InTune
    • Intune Certificate Connector
    • Intune PFX Connector
    • IP-HTTPS
    • IPv6
    • IPv6 Transition
    • ISATAP
    • KDC Proxy
    • Kemp
    • Kerberos
    • L2TP
    • learning
    • Load Balancing
    • LoadMaster
    • local traffic manager
    • LTM
    • Manage Out
    • MDM
    • MEM
    • MEMCM
    • MFA
    • Microsoft
    • Microsoft Endpoint Manager
    • Microsoft Entra
    • Microsoft Entra Global Secure Access
    • Microsoft Entra ID
    • Microsoft Entra Internet Access
    • Microsoft Entra Private Access
    • Microsoft Ignite
    • Microsoft Intune
    • Mobile Device Management
    • Mobility
    • Multifactor Authentiction
    • multisite
    • MVP
    • NAC
    • Name Resolution
    • name resolution policy table
    • NAP
    • NCA
    • NCSI
    • NDES
    • NetMotion
    • NetMotion Mobility
    • NetMotion Software
    • Netscaler
    • Network Access Control
    • network connectivity assistant
    • network connectivity status indicator
    • Network Device Enrollment Service
    • Network Device Enrollment Services
    • network policy server
    • nmap
    • NPS
    • NRPT
    • Offline Domain Join
    • OMA-DM
    • OMA-URI
    • Open Source
    • OpenDNS
    • OpenSSL
    • OpenVPN
    • Operational Support
    • OTP
    • PEAP
    • PFX Connector
    • PKCS
    • PKI
    • Pluralsight
    • PointSharp
    • PowerShell
    • PPTP
    • Private Network Connector
    • Professional Services
    • ProfileXML
    • Protected EAP
    • Proxy
    • Proxy Server
    • public cloud
    • public key infrastructure
    • Quad9
    • RasMan
    • RDP
    • Recommended Reading
    • Reddit
    • Remote Access
    • Remote Administration
    • Remote Desktop Protocol
    • reporting
    • routing
    • routing and remote access service
    • RRAS
    • RSAT
    • SASE
    • SCCM
    • SCEP
    • Secure Access Service Edge
    • Secure Service Edge
    • Secure Socket Tunneling Protocol
    • Secure Web Gateway
    • Security
    • Security Service Edge
    • Security Update
    • Server Core
    • Simple Certificate Enrollment Protocol
    • SMSS
    • Split DNS
    • split tunnel
    • split tunneling
    • SQL
    • SQL Server
    • SQL Server 2022
    • SQL Server Management Studio
    • SSE
    • SSL
    • SSL and TLS
    • SSMS
    • SSTP
    • Surface Pro
    • Surface Pro 4
    • SWG
    • System Center 2012
    • System Center Configuration Manager
    • systems management
    • Teredo
    • TLS
    • TLS 1.3
    • TND
    • TPM
    • Traffic Filter
    • Training
    • transition technology
    • Transport Layer Security
    • troubleshooting
    • Trusted Network Detection
    • Trusted Platform Module
    • Uncategorized
    • Update
    • user tunnel
    • video
    • Visual Studio
    • Visual Studio Code
    • VPN
    • VPN Proxy
    • VS Code
    • Vulnerability
    • Web Application Proxy
    • Web Proxy
    • Web Proxy Server
    • webinar
    • Windows 10
    • Windows 11
    • Windows 7
    • Windows 8
    • Windows 8.1
    • Windows Admin Center
    • Windows Server 2008 R2
    • Windows Server 2012
    • Windows Server 2012 R2
    • Windows Server 2016
    • Windows Server 2019
    • Windows Server 2022
    • Windows Server 2025
    • Workshop
    • WorkSite
    • XML
    • Zero Trust
    • Zero Trust Network Access
    • Zscaler
    • ZTNA

All posts tagged computer account

PowerShell Script to Display User or Computer SID

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

Get-Sid Repository on GitHub

Share this:

  • Click to email a link to a friend (Opens in new window) Email
  • Click to print (Opens in new window) Print
  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Pinterest (Opens in new window) Pinterest

Like this:

Like Loading...
Leave a comment
by Richard M. Hicks on November 12, 2024  •  Permalink
Posted in Active Directory, administration, authentication, Enterprise, Microsoft, Operational Support, PowerShell, Security, Windows 10, Windows 11, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019, Windows Server 2022, Windows Server 2025
Tagged Active Directory, authentication, computer account, computer SID, Get-Sid, identity, PowerShell, script, security, security identifier, SID, tool, user account, user SID, utility

Posted by Richard M. Hicks on November 12, 2024

https://directaccess.richardhicks.com/2024/11/12/powershell-script-to-display-user-or-computer-sid/

  • Always On VPN Book

    Always On VPN book available now on Amazon!
  • DirectAccess Book

    Order my DirectAccess book on Amazon now!
  • Recent Posts

    • Mastering Certificates with Microsoft Intune August 2025
    • Techmentor Conference at Microsoft HQ 2025
    • Always On VPN Security Updates June 2025
    • Always On VPN Security Updates May 2025
    • Always On VPN Ask Me Anything (AMA) May 2025
  • Resources

    • About Me
    • Absolute Secure Access
    • Absolute Secure Access Enterprise VPN
    • Absolute Secure Access Purpose-Built Enterprise VPN Advanced Features In Depth
    • Absolute Secure Access Zero Trust Network Access
    • Absolute Secure Access ZTNA
    • Always On VPN
    • Always On VPN and Multifactor Authentication
    • Always On VPN Book
    • Always On VPN DPC
    • Always On VPN DPC
    • Always On VPN DPC Advanced Features
    • Always On VPN DPC with Intune
    • Always On VPN Training
    • Choosing an Enterprise VPN
    • Citrix NetScaler ADC Load Balancing
    • Consulting
    • Consulting Services
    • Contact
    • Digital Certificates and TPM
    • Digital Certificates for Strong Authentication
    • DirectAccess
    • DirectAccess Consulting and Troubleshooting Services
    • DirectAccess Consulting Services
    • DirectAccess End of Life (EOL)
    • DirectAccess is now Always On VPN
    • DirectAccess Training
    • Drawbacks of Multifactor Authentication
    • Enterprise Mobility
    • Enterprise PKI
    • Enterprise VPN
    • Entra Global Secure Access
    • Entra Private Access
    • F5-BIG-IP Load Balancing
    • How Do VPNs Protect You From Cyber Threats?
    • Implementing Always On VPN
    • Implementing DirectAccess with Windows Server 2016
    • Intune and Certificates Training
    • IPv6
    • Kemp LoadMaster Load Balancing
    • Microsoft Cloud PKI for Intune
    • Microsoft Entra Global Secure Access
    • Multifactor Authentication (MFA)
    • NetMotion Mobility
    • NetMotion Mobility Enterprise VPN
    • NetMotion Mobility Purpose-Built Enterprise VPN
    • NetMotion Mobility Purpose-Built Enterprise VPN Advanced Features In Depth
    • Network Security and Virtual Private Networks (VPNs)
    • Newsletter
    • PKI
    • Richard M. Hicks Consulting Named in Enterprise Networking Magazine’s Top 10 VPN Consulting Services for 2020
    • Secure Access Service Edge (SASE)
    • Secure Service Edge (SSE)
    • Secure Web Gateway
    • Security Service Edge (SSE)
    • SSE vs. SASE
    • Training
    • Virtual Private Network (VPN)
    • Virtual Private Networking (VPN) and the Cloud
    • What Is a Secure Web Gateway?
    • What is a VPN?
    • What Is Always On VPN
    • What's The Difference Between SSE and SASE?
    • Zero Trust
    • Zero Trust Network Access (ZTNA)
    • ZTNA
  • Always On VPN Resources

    • Always On VPN Advanced Features
    • Always On VPN Enhancements
    • Always On VPN Features
    • Always On VPN Remote Access
    • Always On VPN Technology Overview
    • Always On VPN Troubleshooting
    • Deploy Always On VPN
  • DirectAccess Resources

    • DirectAccess Book
    • DirectAccess Consulting Services
    • DirectAccess Kemp Load Balancer Deployment Guide
    • DirectAccess Mailing List
    • DirectAccess on Microsoft TechNet
    • DirectAccess Play-by-Play Video
    • DirectAccess Video Training
    • DirectAccess Videos on YouTube
    • Remote Access on Microsoft TechNet
  • Active Directory ADC AD CS Always On VPN AOVPN application delivery controller authentication Azure CA certificate certificates Certification Authority cloud Cloud PKI configuration device tunnel DirectAccess DNS DPC EAP education encryption endpoint manager enterprise mobility error F5 firewall Forefront UAG GPO group policy high availability hotfix IKEv2 Important Links InTune IP-HTTPS IPsec IPv6 IPv6 transition technology Kemp learning load balancer load balancing LoadMaster management Manage Out MDM MEM Microsoft Microsoft Endpoint Manager Microsoft Intune Mobility Networking network location server network policy server NLB NLS NPS PEAP performance PKCS PKI PowerShell ProfileXML public cloud public key infrastructure RADIUS RAS RasClient redundancy Remote Access routing routing and remote access service RRAS SCCM SCEP security SSL SSTP System Center Configuration Manager TLS training troubleshooting update user tunnel VPN vulnerability warning Windows Windows 7 Windows 8 Windows 10 Windows 11 Windows Server Windows Server 2012 Windows Server 2012 R2 Windows Server 2016 Windows Server 2019 Windows Server 2022 XML

 

Loading Comments...
 

    %d