Add PowerShell logging registry keys
This commit is contained in:
Родитель
8b7e87c2ac
Коммит
f56b7da0e9
|
@ -131,12 +131,16 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
||||||
//Enble PowerShell logging
|
//Enble PowerShell logging
|
||||||
"type": "PowerShell",
|
"type": "PowerShell",
|
||||||
"name": "PowerShellLogging",
|
"name": "PowerShellLogging",
|
||||||
"runElevated": true,
|
"runElevated": true,
|
||||||
"inline": [
|
"inline": [
|
||||||
|
"New-Item -Path 'HKLM:\\Software\\Policies\\Microsoft\\Windows' -Name PowerShell",
|
||||||
|
"New-Item -Path 'HKLM:\\Software\\Policies\\Microsoft\\Windows\\PowerShell' -Name ScriptBlockLogging",
|
||||||
|
"New-Item -Path 'HKLM:\\Software\\Policies\\Microsoft\\Windows\\PowerShell' -Name ModuleLogging",
|
||||||
|
"New-Item -Path 'HKLM:\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\ModuleLogging' -Name ModuleNames",
|
||||||
|
"New-Item -Path 'HKLM:\\Software\\Policies\\Microsoft\\Windows\\PowerShell' -Name Transcription",
|
||||||
"Set-ItemProperty -Path 'HKLM:\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging' -Name EnableScriptBlockLogging -Value 1 -Type 'DWord'",
|
"Set-ItemProperty -Path 'HKLM:\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging' -Name EnableScriptBlockLogging -Value 1 -Type 'DWord'",
|
||||||
"Set-ItemProperty -Path 'HKLM:\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\ModuleLogging' -Name EnableModuleLogging -Value 1 -Type 'DWord'",
|
"Set-ItemProperty -Path 'HKLM:\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\ModuleLogging' -Name EnableModuleLogging -Value 1 -Type 'DWord'",
|
||||||
"Set-ItemProperty -Path 'HKLM:\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\ModuleLogging\\ModuleNames' -Name '*' -Value '*' -Type 'String'",
|
"Set-ItemProperty -Path 'HKLM:\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\ModuleLogging\\ModuleNames' -Name '*' -Value '*' -Type 'String'",
|
||||||
|
|
Загрузка…
Ссылка в новой задаче