Posted On March 31, 2019

PowerShell Commands to Install the NTFSSecurity Module

kimconnect 0 comments
blog.KimConnect.com >> Codes >> PowerShell Commands to Install the NTFSSecurity Module
Background information:
- NTFS code is hosted on Github: https://codeload.github.com/raandree/NTFSSecurity/zip/refs/heads/master
- 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 -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 *

Related Post

PowerShell: Rename Hyper-V Object and Clustered Role Resource

$oldName='testWindows' $newName='server01.intranet.kimconnect.com' # Rename Hyper-V Clustered Resource: Guess VM $vm=Get-clustergroup -Cluster (get-cluster).Name -Name $oldName $vm.Name=$newName…

Some Batch Files

REM Date.batset fscfg=m:\mfgsys\fs.cfgm:\fs_apps\setcfg N0 DT_TODAY={TODAY} REM lexp.batfsguiapp.exe -s -cm:\mfgsys\fs.cfg -iAAA{TAB}y2k99{CR}bexe{ESC}exp{CR}exit Rem Invoice_Prints_ZZ1_2_3_.batfsguiapp.exe -cm:\mfgsys\fs.cfg -iZZ1{TAB}pass1{CR}bexe{ESC}zz1{CR}M:\cabsauto\timeout 15fsguiapp.exe…

PowerShell: Perform DISM Restore Health on Remote Servers

# This script will use a Windows ISO image to Repair Remote Computers$isoPath="\\FILESHERVER007\F$\Windows_Server_2016_Datacenter_EVAL_en-us_14393_refresh.ISO"$remoteComputers="TESTKOMPUTER","TESTKOMPUTER2"function restoreServerHealth($iso){ #…