I am trying to add a check for the SPN in our SQL review script. I will have the ability to build a variable with the SQL server name instance name.
When I use CMD > setspn -L DOMAIN\USER I get a list that I can search and see if the SPN has been created or not.
There must be a way I can use powershell to get that list, then search the list for a string value.
Just to be specific, I am looking for a way to use powershell to query Active Directory for a value LIKE 'my-sql-intance' name. I just need to return SPNs that look like they match the string value.