Hello Jonathan,
Thank you for posting your question on the Microsoft Windows Forum!
The error in your screenshot indicates that OpenSSL is not installed, or its installation path is not included in the Windows PATH environment variable.
The key error is:
openssl : The term 'openssl' is not recognized as the name of a cmdlet,
function, script file, or operable program.
This means PowerShell cannot find openssl.exe.
Step 1: Check Whether OpenSSL Is Installed
Open Command Prompt or PowerShell and run:
where openssl
If nothing is returned, OpenSSL is either:
- Not installed, or
- Not in the PATH environment variable.
Step 2: Check for OpenSSL Installation
Look for OpenSSL in common locations such as:
C:\Program Files\OpenSSL-Win64</span>
or
C:\Program Files (x86)\OpenSSL-Win32</span>
If you find:
openssl.exe
try running it directly:
& "C:\Program Files\OpenSSL-Win64\bin\openssl.exe" version
If a version number is displayed, OpenSSL is installed but not added to PATH.
Step 3: Add OpenSSL to PATH
If OpenSSL is installed:
- Open:
System Properties
→ Advanced
→ Environment Variables
Under System Variables, edit:
Path
- Add the OpenSSL bin folder, for example:
C:\Program Files\OpenSSL-Win64\bin
- Open a new PowerShell window and test:
openssl version
Step 4: Install OpenSSL (If Not Installed)
If OpenSSL is not installed, install it first and then reopen PowerShell.
After installation, verify:
openssl version
returns a valid version.
Step 5: Generate the Key Again
Once OpenSSL is working, re-run:
openssl genrsa -out dkim_private.key 2048
Additional Information
Could you please confirm:
- Is this Windows Server or Windows 11?
- Have you already installed OpenSSL?
- What is the output of:
where openssl
This will help determine whether OpenSSL is missing entirely or simply not available in the PATH.
I hope this answer has brought you useful information. If so, please click on "Accept Answer" and consider upvoting it. Doing so helps other community members identify useful solutions to similar issues