PowerShell Commands to Install the NTFSSecurity Module

Background information:
- NTFS code is hosted on Github: https://github.com/raandree/NTFSSecurity/archive/master.zip
- Find module path with this command: $Env:PSModulePath (please note that: %Windir%\System32\WindowsPowerShell\v1.0\Modules)
- A good location would be "C:\Program Files\WindowsPowerShell\Modules"

cd "C:\Program Files\WindowsPowerShell\Modules"
wget https://gallery.technet.microsoft.com/scriptcenter/1abd77a5-9c0b-4a2b-acef-90dbb2b84e85/file/107400/19/NTFSSecurity.zip -OutFile ntfssecurity.zip

Add-Type -AssemblyName System.IO.Compression.FileSystem
function Unzip
{
param([string]$zipfile, [string]$outpath)
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath)
}

Unzip "C:\Program Files\WindowsPowerShell\Modules\ntfssecurity.zip" "C:\Program Files\WindowsPowerShell\Modules\ntfssecurity"
Remove-Item "C:\Program Files\WindowsPowerShell\Modules\ntfssecurity.zip"

Leave a Reply

Your email address will not be published. Required fields are marked *