{"id":5338,"date":"2021-12-17T02:34:06","date_gmt":"2021-12-17T02:34:06","guid":{"rendered":"https:\/\/pariswells.com\/blog\/?p=5338"},"modified":"2021-12-17T02:34:06","modified_gmt":"2021-12-17T02:34:06","slug":"powershell-sid-history-updates-in-acls-can-be-added-instead-of-replaced","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/research\/powershell-sid-history-updates-in-acls-can-be-added-instead-of-replaced","title":{"rendered":"powershell SID history updates in ACLs can be added instead of replaced."},"content":{"rendered":"<p>MS Guide<\/p><p>Old : <a href=\"https:\/\/docs.microsoft.com\/en-us\/archive\/blogs\/ashleymcglone\/active-directory-powershell-sidhistory-module-update-1-5\">Active Directory PowerShell SIDHistory Module Update 1.5 | Microsoft Docs<\/a><\/p><p>New :\u00a0<a href=\"https:\/\/docs.microsoft.com\/en-us\/archive\/blogs\/ashleymcglone\/powershell-module-for-active-directory-sid-history-now-faster\">PowerShell Module for Active Directory SID History Now Faster | Microsoft Docs<\/a><\/p><p>Archives script here<\/p><p><a href=\"https:\/\/github.com\/GoateePFE\/TechNetGalleryArchive\/blob\/master\/SIDHistoryModule.zip\">TechNetGalleryArchive\/SIDHistoryModule.zip at master \u00b7 GoateePFE\/TechNetGalleryArchive \u00b7 GitHub<\/a><\/p><p><strong>Take Ownership ( Run in Powershell for the 255 Chat )\u00a0<\/strong><\/p><p>TAKEOWN \/F &#8220;E:\\Gdrive\\Folder&#8221; \/a \/r \/d y<\/p><p><strong>Add Permission ( Run in Powershell for the 255 Chat )\u00a0<\/strong><\/p><p>ICACLS &#8220;E:\\Gdrive\\Departments\\Executive Management\\Budget 2014&#8221; \/grant administrators:F \/t<\/p><p><strong>Regex for SID<\/strong><\/p><pre class=\"lang-php s-code-block\"><code class=\"hljs language-php\"><span class=\"hljs-string\">S-1-5-21-\\d+-\\d+\\-\\d+\\-\\d+\/<br \/><br \/><\/span><\/code><\/pre><pre class=\"lang-php s-code-block\">Find User or Group<code class=\"hljs language-php\"><span class=\"hljs-string\"><br \/>Get-ADObject -IncludeDeletedObjects -Filter * -Properties * | where{$_.objectSid -eq \"S-1-5-21-XXXXXXX-XXXXXXXXXXXXX\"} | Select objectSid,CanonicalName | Add-Content sidhash.txt<br \/><br \/><br \/>https:\/\/helgeklein.com\/blog\/howto-reacling-a-file-server-in-a-domain-migration-with-setacl-3-0\/<\/span><\/code><\/pre><pre class=\"lang-php s-code-block\"><code class=\"hljs language-php\"><\/code><\/pre>","protected":false},"excerpt":{"rendered":"<p>MS GuideOld : Active Directory PowerShell SIDHistory Module Update 1.5 | Microsoft DocsNew :\u00a0PowerShell Module for Active Directory SID History Now Faster | Microsoft DocsArchives script hereTechNetGalleryArchive\/SIDHistoryModule.zip [&hellip;]<\/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-5338","post","type-post","status-publish","format-standard","hentry","category-research"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/5338","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=5338"}],"version-history":[{"count":7,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/5338\/revisions"}],"predecessor-version":[{"id":5461,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/5338\/revisions\/5461"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=5338"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=5338"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=5338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}