Add check for NT SERVICE\sppsvc
This commit is contained in:
parent
ddccc4025f
commit
5728ba2686
@ -1443,7 +1443,7 @@ if not defined permerror (
|
|||||||
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% && (
|
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% && (
|
||||||
set "pol=HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Policies"
|
set "pol=HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Policies"
|
||||||
reg query "!pol!" %nul% || reg add "!pol!" %nul%
|
reg query "!pol!" %nul% || reg add "!pol!" %nul%
|
||||||
%psc% "$acl = (Get-Acl 'Registry::!pol!' | fl | Out-String); if (-not ($acl -match 'NT AUTHORITY\\NETWORK SERVICE Allow FullControl') -or ($acl -match 'NT AUTHORITY\\NETWORK SERVICE Deny')) {Exit 3}" %nul%
|
%psc% "$acl = (Get-Acl 'Registry::!pol!' | fl | Out-String); if (-not ($acl -match 'NT AUTHORITY\\NETWORK SERVICE Allow FullControl' -or $acl -match 'NT SERVICE\\sppsvc Allow FullControl') -or ($acl -match 'Deny')) {Exit 3}" %nul%
|
||||||
if !errorlevel!==3 set "permerror=Error Found In S-1-5-20 SPP"
|
if !errorlevel!==3 set "permerror=Error Found In S-1-5-20 SPP"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -1581,7 +1581,7 @@ if not defined permerror (
|
|||||||
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% && (
|
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% && (
|
||||||
set "pol=HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Policies"
|
set "pol=HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Policies"
|
||||||
reg query "!pol!" %nul% || reg add "!pol!" %nul%
|
reg query "!pol!" %nul% || reg add "!pol!" %nul%
|
||||||
%psc% "$acl = (Get-Acl 'Registry::!pol!' | fl | Out-String); if (-not ($acl -match 'NT AUTHORITY\\NETWORK SERVICE Allow FullControl') -or ($acl -match 'NT AUTHORITY\\NETWORK SERVICE Deny')) {Exit 3}" %nul%
|
%psc% "$acl = (Get-Acl 'Registry::!pol!' | fl | Out-String); if (-not ($acl -match 'NT AUTHORITY\\NETWORK SERVICE Allow FullControl' -or $acl -match 'NT SERVICE\\sppsvc Allow FullControl') -or ($acl -match 'Deny')) {Exit 3}" %nul%
|
||||||
if !errorlevel!==3 set "permerror=Error Found In S-1-5-20 SPP"
|
if !errorlevel!==3 set "permerror=Error Found In S-1-5-20 SPP"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -1891,7 +1891,7 @@ if not defined permerror (
|
|||||||
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% && (
|
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% && (
|
||||||
set "pol=HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Policies"
|
set "pol=HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Policies"
|
||||||
reg query "!pol!" %nul% || reg add "!pol!" %nul%
|
reg query "!pol!" %nul% || reg add "!pol!" %nul%
|
||||||
%psc% "$acl = (Get-Acl 'Registry::!pol!' | fl | Out-String); if (-not ($acl -match 'NT AUTHORITY\\NETWORK SERVICE Allow FullControl') -or ($acl -match 'NT AUTHORITY\\NETWORK SERVICE Deny')) {Exit 3}" %nul%
|
%psc% "$acl = (Get-Acl 'Registry::!pol!' | fl | Out-String); if (-not ($acl -match 'NT AUTHORITY\\NETWORK SERVICE Allow FullControl' -or $acl -match 'NT SERVICE\\sppsvc Allow FullControl') -or ($acl -match 'Deny')) {Exit 3}" %nul%
|
||||||
if !errorlevel!==3 set "permerror=Error Found In S-1-5-20 SPP"
|
if !errorlevel!==3 set "permerror=Error Found In S-1-5-20 SPP"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -2892,7 +2892,7 @@ if not defined permerror (
|
|||||||
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% && (
|
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% && (
|
||||||
set "pol=HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Policies"
|
set "pol=HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Policies"
|
||||||
reg query "!pol!" %nul% || reg add "!pol!" %nul%
|
reg query "!pol!" %nul% || reg add "!pol!" %nul%
|
||||||
%psc% "$acl = (Get-Acl 'Registry::!pol!' | fl | Out-String); if (-not ($acl -match 'NT AUTHORITY\\NETWORK SERVICE Allow FullControl') -or ($acl -match 'NT AUTHORITY\\NETWORK SERVICE Deny')) {Exit 3}" %nul%
|
%psc% "$acl = (Get-Acl 'Registry::!pol!' | fl | Out-String); if (-not ($acl -match 'NT AUTHORITY\\NETWORK SERVICE Allow FullControl' -or $acl -match 'NT SERVICE\\sppsvc Allow FullControl') -or ($acl -match 'Deny')) {Exit 3}" %nul%
|
||||||
if !errorlevel!==3 set "permerror=Error Found In S-1-5-20 SPP"
|
if !errorlevel!==3 set "permerror=Error Found In S-1-5-20 SPP"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user