Some Powershell bugs fixed. (#369)

* Some Powershell bugs fixed.

* Update T1112.md
This commit is contained in:
Superbug
2018-10-04 15:48:16 +03:00
committed by Zac Brown
parent eb9cf5f42c
commit 36bdfd4731
+3 -1
View File
@@ -109,6 +109,7 @@ for ($p = 0; $p -lt ($ProfileList | Measure-Object).count; $p++)
Write-Verbose -Message 'Attempting to modify registry keys for each profile'
#####################################################################
reg add "HKEY_CURRENT_USER\$($ProfileList[$p].SID)\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /t REG_DWORD /v HideFileExt /d 1 /f
}
}
}
@@ -116,6 +117,7 @@ Write-Verbose 'Unloading Registry hives for all users'
# Unload ntuser.dat
### Garbage collection and closing of ntuser.dat ###
[gc]::Collect()
reg unload "HKU\$($ProfileList[$p].SID)"
cmd /c start reg unload "HKU\$($ProfileList[$p].SID)"
```
<br/>