How to deploy cert to apache httpd?

The GUI runs under the current user while the service that does the real work runs as local system. If you’re doing something like setting a PATH variable with your OpenSSL path, it won’t be available to the service. You can just put a cd to your OpenSSL path before calling OpenSSL and that should work.

As for what you can pull from the passed variable in PowerShell, I made a list(might be old?) here: List of Script Variables

I would try $result.ManagedItem.Name for what you called the entry and $result.ManagedItem.DomainOptions.Domain for the domain name?