{"id":7885,"date":"2024-05-14T00:22:51","date_gmt":"2024-05-14T00:22:51","guid":{"rendered":"https:\/\/pariswells.com\/blog\/?p=7885"},"modified":"2024-05-14T00:22:54","modified_gmt":"2024-05-14T00:22:54","slug":"remove-a-service-principal-name-spn-from-the-user-to-mitigate-the-risk","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/research\/remove-a-service-principal-name-spn-from-the-user-to-mitigate-the-risk","title":{"rendered":"Remove a Service Principal Name (SPN) from the user to mitigate the risk."},"content":{"rendered":"\n<p><strong>List SPNS<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">get-aduser -Identity administrator -Properties serviceprincipalnames | foreach { $_.serviceprincipalnames }<\/code><\/pre>\n\n\n\n<p><strong>Clear SPNS<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">Set-ADUser -Identity admin-x -ServicePrincipalNames $null<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>You can&#8217;t use setspn as only works with Hostname<\/p>\n\n\n\n<p>FindDomainForAccount: Call to DsGetDcNameWithAccountW failed with return value 0x00000525<br>Could not find account admin-x<\/p>\n","protected":false},"excerpt":{"rendered":"<p>List SPNS Clear SPNS You can&#8217;t use setspn as only works with Hostname FindDomainForAccount: Call to DsGetDcNameWithAccountW failed with return value 0x00000525Could not find account admin-x<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7885","post","type-post","status-publish","format-standard","hentry","category-research"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/7885","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=7885"}],"version-history":[{"count":1,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/7885\/revisions"}],"predecessor-version":[{"id":7886,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/7885\/revisions\/7886"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=7885"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=7885"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=7885"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}