To locate a specific SPN, check out our posts Finding an SPN in Active Directory using Perl and Finding an SPN in Active Directory using VBScript.
The PowerShell script below finds all SPNs in your domain of the service type that you specify. In the example below, I have the service type set to "HTTP", so the script returns all of the HTTP/ SPNs. The script uses the directorySearcher .Net class to find the accounts with HTTP/ SPNs.
- Backup DFS Namespaces Using PowerShell
- Translate Active Directory Name Formats Using PowerShell
- List Linux Users in Active Directory Using PowerShell
- Enable Trust for Delegation in Active Directory Using PowerShell
- TCP/IP Subnet Math with PowerShell - What AD Site is that Server in?
- List Sites and Subnets in Active Directory with PowerShell
- Find Disabled Users in Active Directory with PowerShell
- List Forest-wide Group Memberships with PowerShell
- Find Old Computer Accounts in AD with PowerShell
- List SPNs in Active Directory with PowerShell
- List Domain Controllers in Active Directory