Using a script
Last updated
Was this helpful?
Last updated
Was this helpful?
Applies to: Patch My PC Cloud
By using a script to deploy the Patch My PC (PMPC) certificate, you can either deploy the certificate as a:
In environments where a company configures an all-signed PowerShell policy or enforces script signature checking on the Win32 app in the Intune admin center, all scripts must be signed by a trusted publisher. Our script helps import the required certificate into the Trusted Publisher store to ensure that scripts signed by Patch My PC (PMPC) can be executed without issues.
To deploy our code signing certificate using a script, first download our scripts from:
To deploy our certificate using a script, follow the article using the following values.
Add
Windows 10 and later
Name
A descriptive name for the policy. E.g. “Patch My PC Trusted Publisher Certificate”`
Description
Enter an optional description for the policy
Script location
Browse to and select Import-PMPTrustedPublisherCertificate.ps1
Run this script using the logged on credentials
No
Enforce script signature check
No
Run script in 64 bit PowerShell Host
No
Configure as required.
Assign the configuration template to the desired Entra ID group(s).
Double-check everything before clicking Add.
You can see the script being processed by the Intune Management Extension by looking in the IntuneManagementExtension.log located at:
Name
A descriptive name for the policy. E.g. “Patch My PC Trusted Publisher Certificate”`
Description
Enter an optional description for the policy.
Publisher
Enter “Patch My PC”
Detection script file
Browse to and select PMPTrustedPublisherCertificate_HealthScript_Detection.ps1
Remediation script file
Browse to and select Import-PMPTrustedPublisherCertificate.ps1
Run this script using the logged on credentials
No
Enforce script signature check
No
Run script in 64 bit PowerShell Host
No
Configure as required.
Assign the configuration template to the desired Entra ID group(s), then configure the frequency you want the Proactive Remediation to be executed on the targeted devices.
Double-check everything before clicking Create.
You can see the script being processed by the Intune Management Extension by looking in the HealthScriptss.log located at:
Observe the Proactive Remediation Device Status blade.
The following log snippet shows the HealthScripts.log entry if the pre-remediation (detection) script found the certificate already installed in the local computer’s Trusted Publishers store.
The following log snippet shows the HealthScripts.log entry if the pre-remediation (detection) script did not find the certificate already installed in the local machine’s Trusted Publishers store (the Exit code of the script is 1).
The following log snippet shows the HealthScripts.log entry if the pre-remediation (detection) script did not find the certificate already installed in the local machine’s Trusted Publishers store and the remediation script was run successfully (Exit code of the script is 0).
To deploy our certificate using a proactive remediation deployment, follow the article using the following values.