PowerShell Scripts

PowerShell scripts used in alert event handlers and workflows are stored in the Keyfactor Command database and need to first be imported into the database using the POST /Extensions/Scripts APIClosed An API is a set of functions to allow creation of applications. Keyfactor offers the Keyfactor API, which allows third-party software to integrate with the advanced certificate enrollment and management features of Keyfactor Command. operation (see POST Extensions Scripts) before they will be available for use in alerts and workflows. Scripts can only be managed through the Keyfactor API.

Important:  PowerShell scripts use PowerShell 7 to run by default. Some cmdlets that run in earlier versions of PowerShell are not compatible with PowerShell 7. If you need to use a PowerShell cmdlet that is not compatible with PowerShell 7, you may need to enable the PowerShell 5.1 option. PowerShell 5.1 is not supported on Keyfactor Command servers running in a non-Windows environment.
Important:  PowerShell scripts are not supported for the Use Custom PowerShell workflowClosed A workflow is a series of steps necessary to complete a process. In Keyfactor Command, it refers to the workflow builder, which allows you to automate event-driven tasks such as when a certificate is requested, revoked or found in a certificate store. step and the PowerShell event handler for the legacy alerting system when using Keyfactor Command installed in containers under Kubernetes.