Powershell module to assist with removing sidHistories and other SID convertions
- Download module
- Unblock-File
- Unpack file
- Put the files in a folder that is in PSModulePath environment variable: ⋅⋅* Documents\WindowsPowerShell\Modules (Per User) ⋅⋅* C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules (Per Computer)
Load all sidhistories from the AD
Add-TranslationTableFromAD
Add extra SID that we might want translated even though they dont exist as sidhistory objects
Add-TranslationTableWellKnownSids -SourceBaseSID 'S-1-5-21-3-2-1' -DestinationBaseSID 'S-1-5-21-1-2-3'
Convert the rights, owner and ownergroup using
Convert-SHRFileSystem -Path C:\temp\example -Verbose -Recurse
Instead of building the Translation table each time, export and import it if there are no changes made.
Export-TranslationTable -Path C:\Temp\export.xml
Import-TranslationTable C:\Temp\export.xml