Certificate Import - Trusted Root and Trusted Publisher
Imports a certificate into Local Machine Trusted Root and Trusted Publisher stores, then verifies presence by subject.
Script Actions
Script Actions
Credibility
Last reviewed
Jul 8, 2026
Last tested
Jun 1, 2026
PowerShell
Windows PowerShell 5.1
Safety score
52/100
Documentation
100/100
Community rating
Coming soon
Downloads
Coming soon
Review status
approved
Verified by OperatorOS
Review
OperatorOS verified
Catalog
Official library
Safety
Static scan completed
Certificate Import - Trusted Root and Trusted Publisher is part of the official OperatorOS ScriptForge catalog. It has been reviewed for metadata completeness, safety scan results, PowerShell compatibility, and technician-facing documentation.
Script Body
# OperatorOS ScriptForge imported Xodus library script
# Workbook ref: SCR-006
# Title: Certificate Import - Trusted Root and Trusted Publisher
# Category: Certificate / Trust
# Ready state: Ready
# Workbook risk: high
# Body type: PowerShell / Command Block
$OperatorOSFrameworkCandidates = @(
(Join-Path -Path $PSScriptRoot -ChildPath '..\..\..\framework\OperatorOS-ScriptFramework.psm1'),
(Join-Path -Path $PSScriptRoot -ChildPath '..\..\..\..\framework\OperatorOS-ScriptFramework.psm1')
)
$OperatorOSFrameworkPath = $OperatorOSFrameworkCandidates | Where-Object { Test-Path -LiteralPath $_ } | Select-Object -First 1
if ($OperatorOSFrameworkPath) {
Import-Module $OperatorOSFrameworkPath -Force
}
$ErrorActionPreference = 'Stop'
$CertPath = "C:\temp\VeradigmPM\APP-SERVER.example.local.cer"
certutil -addstore -f "Root" $CertPath
certutil -addstore -f "TrustedPublisher" $CertPath
$CertSubjectSearch = "APP-SERVER"
Write-Host "`n=== Trusted Root ===" -ForegroundColor Cyan
Get-ChildItem Cert:\LocalMachine\Root |
Where-Object { $_.Subject -match $CertSubjectSearch } |
Select-Object Subject, Issuer, NotBefore, NotAfter, Thumbprint
Write-Host "`n=== Trusted Publishers ===" -ForegroundColor Cyan
Get-ChildItem Cert:\LocalMachine\TrustedPublisher |
Where-Object { $_.Subject -match $CertSubjectSearch } |
Select-Object Subject, Issuer, NotBefore, NotAfter, Thumbprint
Requirements
- Windows PowerShell 5.1 or newer for Windows Endpoint.
- Required tooling: certutil / PowerShell.
- Recommended run context: Elevated PowerShell or CMD.
Parameters
CertPath
path / required
Workbook input carried forward from: $CertPath, $CertSubjectSearch
CertSubjectSearch
path / required
Workbook input carried forward from: $CertPath, $CertSubjectSearch
Examples
Run script
Runs the imported OperatorOS script after reviewing parameters and placeholders.
./certificate-trust-certificate-import-trusted-root-and-trusted-publisher.ps1Changelog
1.0.0 - Imported from Xodus / OperatorOS Script Library workbook with OperatorOS metadata, redaction notes, and framework bootstrap.