Skip to content

Commit 1827e4e

Browse files
Update script/powershell docs, ccm intro
1 parent ff0bd75 commit 1827e4e

9 files changed

Lines changed: 780 additions & 742 deletions

File tree

docs/deployment/tasks_intro.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Built-in deployment task types, each with UI to configure the task parameters et
4646
| Deploy to RAS (Direct Access, VPN, SSTP VPN etc)| Provides a basic deployment for RAS. You may require your own script for more sophisticated deployments. |
4747
| Deploy to RDP Gateway Service| Provides a basic deployment for a local RDP Gateway. You may require your own script for more sophisticated deployments. |
4848
| Deploy to RDP Listener Service| Provides a basic deployment for a local RDP Listener (Terminal Services). |
49+
| [Run a PowerShelll Script](../script-hooks.md) | Executes a given PowerShell script |
4950
| Run a Script | Execute an environment specific script (such as as a windows batch file or a linux bash script). |
5051
| Stop, Start or Restart a Service | Select a local service to restart. Usually used in conjunction with another deployment task to cause the new certificate to be applied. |
5152
| Set Certificate Key Permissions | Although not usually required, some services may need read permission granted for the certificate private key. This task adds read permission for the nominated account. |
@@ -55,6 +56,8 @@ Built-in deployment task types, each with UI to configure the task parameters et
5556

5657
Execute a custom [PowerShell script](../script-hooks.md).
5758

59+
For execution-mode selection, PowerShell version behavior, and impersonation considerations see [PowerShell Support and Execution Modes](../guides/powershell-support.md).
60+
5861
Some example scripts (e.g. for `Web Management Service`) are provided under `C:\Program Files\CertifyTheWeb\Scripts\Common`. If you use any of these you should copy the script to your own choice of folder outside of Program Files as any app updates will overwrite the files in this Program Files location and any edits you make will be lost.
5962

6063
#### Passing custom arguments

docs/guides/powershell-support.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
---
2+
id: powershell-support
3+
title: PowerShell Support and Execution Modes
4+
slug: /powershell-support
5+
description: How Certify runs PowerShell-based tasks on Windows and Linux, including Automatic, In Process, and System PowerShell modes.
6+
---
7+
8+
This page describes how PowerShell-based tasks are hosted in *Certify Certificate Manager*, *Certify Management Agent*, and *Certify Management Hub*, including the [*Run a PowerShell Script*](../script-hooks.md) task and most built-in tasks which rely on PowerShell internally.
9+
10+
## Overview
11+
12+
These products can use either system PowerShell, when available, or an in-process hosted PowerShell. By default, tasks run as the current service user.
13+
14+
These PowerShell execution modes are currently supported:
15+
16+
| Mode | What it does | Typical use |
17+
| --- | --- | --- |
18+
| Automatic | Uses system PowerShell where available, then falls back to the embedded in-process host when no suitable system host is available. On Windows this typically means Windows PowerShell 5.1. On Linux this typically means the embedded host. | Recommended default for most tasks. |
19+
| In Process | Runs the embedded PowerShell 7 host inside the current Certify service process. | Use when you want consistent PowerShell 7 behavior without depending on the machine's local PowerShell installation. |
20+
| System PowerShell | Starts a separate PowerShell process provided by the operating system. | Use when your script depends on system-installed modules or host-specific behavior. |
21+
22+
If you enable *Settings > General > Service Config > Prefer Modern PowerShell* for your chosen instance, the app will prefer PowerShell 7 where available when launching System PowerShell.
23+
24+
## Automatic Mode
25+
26+
*Automatic* mode is used by default for the *Run a PowerShell Script* task and for most built-in tasks which use PowerShell internally.
27+
28+
On Windows, *Automatic* uses the system PowerShell host by default. This typically means Windows PowerShell 5.1.
29+
30+
On platforms where no suitable system PowerShell host is available, *Automatic* falls back to the embedded in-process PowerShell 7 host. This is the normal behavior for Linux-based installs.
31+
32+
## In Process Mode
33+
34+
*In Process* runs the embedded PowerShell 7 runtime inside the current Certify service process.
35+
36+
Use this mode when you want predictable PowerShell 7 behavior regardless of what is installed on the machine, or when you want to avoid relying on a separate system shell.
37+
38+
This is the closest equivalent to the older embedded-host model, except the embedded engine is now PowerShell 7 rather than embedded Windows PowerShell 5.1. PowerShell 5.1 is no longer available as an embedded option because it depends on a much older .NET runtime than the app uses.
39+
40+
Currently, system PowerShell modules such as CimCmdlets may not be available In-Process and you should use an alternative mode.
41+
42+
## System PowerShell Mode
43+
44+
*System PowerShell* launches an external PowerShell process provided by the operating system.
45+
46+
Use this mode when your script depends on system-installed modules, Windows-only cmdlets, or behavior which differs between Windows PowerShell 5.1 and PowerShell 7.
47+
48+
## Impersonation and Compatibility
49+
50+
The choice of execution mode can significantly affect compatibility when a task runs using specific credentials or user credential impersonation. Impersonation is currently only supported on Windows.
51+
52+
Differences between modes can affect:
53+
54+
* which PowerShell version and module set are available
55+
* how Windows logon tokens are applied
56+
* whether child processes inherit the expected identity and environment
57+
* access to network resources, remote shares, and Windows-integrated authentication
58+
59+
On Windows, the service is installed as Local System by default. That limits the type and extent of user impersonation available. If you need fuller user impersonation, you may need to run the service as a different user. That usually requires a service migration, including re-encryption of stored credentials, so it is best planned during the initial install.
60+
61+
If your deployment depends on impersonation, network access, launching other processes, or Windows-specific modules, validate the exact task under the same background service context and credentials you use in production.
62+
63+
Not every workflow will behave reliably under impersonation. If required, a staged approach is often more dependable: export the certificate or write the required values to a known location, then complete the final deployment step using your own scheduled task, watcher process, or service running in the target environment.
64+
65+
## PowerShell Execution Policies
66+
67+
PowerShell execution policies may be set by your administrator, which can affect script execution on Windows. The app tries to set the policy to `Unrestricted` by default, but that may conflict with higher-level policy settings.
68+
69+
You can set the default script execution policy in `%PROGRAMDATA%\Certify\serviceconfig.json`, then restart the Certify background service:
70+
71+
* `"PowershellExecutionPolicy":"Unrestricted"`
72+
* `"PowershellExecutionPolicy":"Bypass"`
73+
* `"PowershellExecutionPolicy":""` to use the default policy set by your administrator
74+
75+
## Recommended Approach
76+
77+
1. Start with *Automatic* unless you already know you need a specific host.
78+
2. Switch to *System PowerShell* when you require system-installed Windows modules or host-specific behavior.
79+
3. Switch to *In Process* when you want consistent embedded PowerShell 7 behavior across environments.
80+
4. If you use impersonation, test with the real background service and target credentials rather than relying on interactive UI testing alone.
81+
82+
## Quick Diagnostics
83+
84+
If you need to confirm which host is being used, add temporary logging like the following to your script:
85+
86+
```PowerShell
87+
param($result)
88+
89+
Write-Output ("PowerShell version: " + $PSVersionTable.PSVersion)
90+
Write-Output ("Edition: " + $PSVersionTable.PSEdition)
91+
Write-Output ("PSHOME: " + $PSHOME)
92+
Write-Output ("User: " + [System.Environment]::UserName)
93+
```
94+
95+
This makes it easier to confirm whether the task is running under Windows PowerShell 5.1, PowerShell 7, the system host, or the embedded in-process host.
96+
97+
For script examples and general scripting guidance, see [Scripting](../script-hooks.md).

docs/intro.md

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,46 @@ title: Get Started with Certify Certificate Manager
44
description: Install Certify Certificate Manager on Windows, request your first certificate, plan renewals, and find the next guides to read.
55
---
66

7-
# Get Started with Certify Certificate Manager
7+
# Certify Certificate Manager
88

9-
*Certify Certificate Manager* is a Windows application and background service for requesting, deploying, auto-renewing, and monitoring SSL/TLS certificates from [Let's Encrypt and other ACME certificate authorities](guides/certificate-authorities.md).
9+
*Certify Certificate Manager* is a Windows application and background service that automates the requesting, deployment, and renewal of SSL/TLS certificates from [Let's Encrypt and other ACME certificate authorities](guides/certificate-authorities.md).
1010

11-
## Best Fit
11+
![Startup UI](/assets/screens/landing_page.png)
1212

13-
- You manage certificates on Windows Server or Windows desktop systems.
14-
- You want a desktop UI with a background service handling renewals.
15-
- You need IIS integration, Windows certificate store deployment, or task-based export and automation.
13+
## Core Capabilities
1614

17-
## Before You Start
15+
- Manage configurations via the desktop application, while a dedicated Windows background service handles scheduled certificate renewals.
16+
- Automatically binds certificates to IIS websites, installs certificates directly to the Windows Certificate Store, or runs deployment tasks to export certificates for other local or remote services.
17+
- Join your [Certify Management Hub](hub) for extended functionality and multi-server administration and monitoring.
1818

19-
- Use a currently supported Windows version with outbound HTTPS access.
20-
- Install on the server or workstation that needs the certificate, unless you have a specific remote deployment design.
21-
- Ensure the domains on the certificate are public and can be validated by either [HTTP validation](http-validation.md) or [DNS validation](dns/validation.md).
22-
- Plan to stay current with updates. Some changes from certificate authorities are operationally significant, and only the latest version is supported.
19+
## System & Domain Requirements
2320

24-
## Fastest Path to a Working Certificate
21+
To use Certify Certificate Manager, your environment should meet the following conditions:
22+
- Use a supported version of Windows ideally with outbound HTTPS access to contact your chosen Certificate Authority (public or custom).
23+
- Install the software directly on the server hosting the target service, or use SSH/UNC shares etc to with deployment tasks to sync certificates to other destination systems.
24+
- Ensure your target domains are active and can complete either [HTTP challenge validation](http-validation.md) (requiring port 80/443 access) or [DNS challenge validation](dns/validation.md) (requiring programmatic control or manual modification of your DNS zone).
25+
- You must keep the software up to date. Certificate Authorities periodically change their services in ways that may become incompatible.
2526

26-
1. Install the app using the [installation guide](guides/installation.md).
27-
2. If you use IIS, keep your hostname bindings in place before starting the first request.
28-
3. Create a new managed certificate and confirm the domains you want to include.
29-
4. Choose [HTTP validation](http-validation.md) or [DNS validation](dns/validation.md), then use **Test** if you want to verify the setup before ordering.
30-
5. Review the [request flow and deployment behavior](certificate-process.md), then request the certificate.
31-
6. Confirm the result in **Preview** and review [renewal behavior](renewals.md) so you know how monitoring and retry logic works.
27+
## Quick Start: Requesting Your First Certificate
28+
29+
Setting up a managed certificate generally involves these steps:
30+
31+
1. **Install:** Download and run the installer as described in the [installation guide](guides/installation.md).
32+
2. **Setup Bindings (IIS):** If you are securing IIS websites, configure your hostname bindings in IIS Manager before beginning.
33+
3. **Add Managed Certificate:** In the Certify UI, click **New Certificate** and specify the domains you want to secure.
34+
4. **Configure Challenge Validation:** Choose a validation method ([HTTP](http-validation.md) or [DNS](dns/validation.md)) and click **Test** to ensure path or DNS access is functional prior to placing the actual order.
35+
5. **Preview**: The Preview tab will show you details of the certificate being ordered and the deployment that will happen, including any matching IIS site bindings the cert will target.
36+
6. **Request Certificate:** Click **Request Certificate** to fetch and apply your certificate. Review the [request and deployment flow](certificate-process.md) to understand how the process executes.
37+
7. **Automatic Renewal:** Once a certificate is successfully requested, Certify's background service will schedule it for routine renewal checks. Learn how this operates in the [renewal behavior guide](renewals.md).
3238

3339

34-
![Startup UI](/assets/screens/landing_page.png)
3540

36-
## What Happens Next
3741

38-
- The background service handles automatic renewals and routine maintenance.
39-
- You can extend deployments using [deployment tasks](deployment/tasks_intro.md), [scripting](script-hooks.md), or the [CLI](commandline.md).
40-
- If you need centralized administration or cross-platform management later, review [Certify Management Hub](hub/).
42+
## Options for Larger Deployments
4143

42-
<div className="diagram">
43-
![Products](/assets/diagrams/products.png)
44-
</div>
44+
- **Unattended Execution:** The Windows background service runs continuously to manage periodic automated renewals even when no users are logged in.
45+
- **Automation Tasks:** Extend your deployment pipeline with built-in [deployment tasks](deployment/tasks_intro.md), custom [scripting hooks](script-hooks.md), or the [command line interface (CLI)](commandline.md).
46+
- **Centralized Administration:** For coordinating across multiple servers or platforms, see the [Certify Management Hub](hub/) documentation.
4547

4648
## Next Docs to Read
4749

0 commit comments

Comments
 (0)