Provision certificates to Microsoft Windows (PowerShell)¶
Provision a certificate from Certificate Manager - SaaS to a Windows server. Certificate Manager - SaaS installs the certificate in the certificate store you choose, and it can then run a function from your PowerShell script on the server to use the certificate, for example, to bind it to a Windows service.
Before you begin¶
- A Microsoft Windows (PowerShell) machine that you created and whose status is Verified.
- The certificate to provision in the Certificate Manager - SaaS inventory, with its private key.
- The System Administrator or PKI Administrator role, or the Resource Owner role and membership in the machine's owning team.
- To run a PowerShell function, a signed script on the server and a server set up as described in PowerShell function contract. The server's PowerShell execution policy must be
AllSigned, and the server must trust both your code-signing certificate and the Palo Alto Networks code-signing certificate.
To provision a certificate to Microsoft Windows (PowerShell)¶
- Sign in to Certificate Manager - SaaS.
- Click Installations > Machines.
- Click the more options button at the end of the machine's row, and then select Provision.
-
In Search a certificate by name, expiration or fingerprint, enter part of the certificate's name, expiration date, or fingerprint, and then select the certificate from the results. Confirm that it's the right certificate by checking Subject DN, Validity, and Certificate SHA1 Fingerprint.
The rest of the Provision a certificate dialog appears after you select a certificate.
-
Under Certificate Information, for CAPI Store, choose the certificate store under the server's local computer account: Personal, Web Hosting, or Remote Desktop.
- In Friendly Name, enter the name the certificate shows in Windows. You can use letters, numbers, spaces, hyphens (-), underscores (_), periods (.), asterisks (*), and parentheses.
- (Optional) To let the private key be exported from the server after installation, enable Allow Private Key to be Exported. By default, the private key isn't exportable.
- (Optional) To run your PowerShell function after the certificate is installed, under Installation Endpoint, enable Invoke a PowerShell script function, which will consume the provisioned certificate. It's disabled by default.
- If you enabled the PowerShell function, in Script Path, enter the absolute path of the script on the server. The path must end in
.ps1, for example,C:\Service Scripts\BindCertificate.ps1. - (Optional) To save the installation without pushing the certificate now, disable Push certificate on save.
- Click Save. To save and then provision another certificate, click Save & New.
After you save, an installation appears on the machine's Installations tab. Certificate Manager - SaaS installs the certificate in the store you chose and its issuing chain in the server's intermediate and trusted root certificate stores. If the certificate is already in the store, Certificate Manager - SaaS updates its friendly name. If you enabled the PowerShell function, Certificate Manager - SaaS then checks that the script exists and that the execution policy is AllSigned, and runs the script's bind-certificate function. If the function fails, provisioning fails and shows the function's error text. To provision on a schedule instead of right away, set up a machine provisioning schedule.