We frequently get asked questions about how to investigate if a machine has the proper settings enabled to trust third party software updates. You can of course go check lots of GPO settings, but ultimately it's a registry setting. So here is a simple PowerShell function, and the key involved which you could use in any RunScrip or other solution.
The registry key you are looking for is:
```Registry
HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate\AcceptTrustedPublisherCerts
```
If you want a function here you go:
```PowerShell
Function Test-TrustedPublishers{
[cmdletbinding()]
param()
$trustedPublisherValue =
try{
$res = (Get-ItemProperty -Path HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate -Name AcceptTrustedPublisherCerts -ErrorAction SilentlyContinue -ErrorVariable err).AcceptTrustedPublisherCerts
if($err){
throw
}
$res
}
Catch {
Write-Error -Message "Could not find or access the key." -ErrorAction Stop
}
if($trustedPublisherValue -eq 1){
Write-Output -InputObject $true
}
Else{
return $false
}
}
Test-TrustedPublishers
```
Want just a one liner instead, here you go:
```PowerShell
(Get-ItemProperty -Path HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate -Name AcceptTrustedPublisherCerts -ErrorAction SilentlyContinue -ErrorVariable err).AcceptTrustedPublisherCerts
```
The result will return 1, 0 or error. If it's a 1 it's enabled, if it's anything else then it's not configured correctly.