Update setupScriptInfo.ps1
This commit is contained in:
@@ -110,7 +110,7 @@ if ($UserSID -ne $null -and $UserHKUPath -ne $null) {
|
||||
$DisallowRunPath = "$UserHKUPath\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun"
|
||||
$applications = @("cmd.exe", "powershell.exe", "powershell_ise.exe")
|
||||
Get-ItemProperty -Path $DisallowRunPath | ForEach-Object {
|
||||
Remove-ItemProperty -Path $DisallowRunPath -Name $_.PSObject.Properties.Name
|
||||
Remove-ItemProperty -Path $DisallowRunPath -Name $_.PSObject.Properties.Name -ErrorAction SilentlyContinue
|
||||
}
|
||||
foreach ($valueName in $applications) {
|
||||
New-ItemProperty -Path $DisallowRunPath -Name $valueName -Value $valueName -PropertyType String
|
||||
|
||||
Reference in New Issue
Block a user