**Kibana version:**  8.3 Snapshot Kibana self-managed environment

**Host OS and Browser version:** Windows, All

**Build details:**
```
VERSION: 8.3.0 Snapshot self-managed
BUILD: 52512
COMMIT: df225b213b188c81888141cee2ec191424fc0649
Elasticsearch artifact link: https://snapshots.elastic.co/8.3.0-6ba9f710/downloads/elasticsearch/elasticsearch-8.3.0-SNAPSHOT-windows-x86_64.zip
```

**Preconditions:**
1. 8.3 Snapshot Kibana self-managed environment should be available.

**Steps to reproduce:**
1. Navigate to `C:\elk\elasticsearch\bin>` through cmd.
2. Run below command:
`elasticsearch-certutil ca --pem`
3. Observe Java exceptions on running cert creation command.

**Expected Result:**
 CA cert should be created on running `elasticsearch-certutil ca --pem` command.

**Screenshot:**
![1](https://user-images.githubusercontent.com/77374876/167078819-20c28e8e-5886-443f-8ab7-1e58d80fb1e2.JPG)


distribution/tools/cli-launcher/src/main/java/org/elasticsearch/launcher/CliToolLauncher.java
});
    }
    @SuppressForbidden(reason = "System#exit")
    private static void exit(int status) {
        System.exit(status);
    }
    /**
     * Configures logging without Elasticsearch configuration files based on the system property "es.logger.level" only. As such, any
     * logging will be written to the console.
     */
    private static void configureLoggingWithoutConfig(Map<String, String> sysprops) {
        
        final String loggerLevel = sysprops.getOrDefault("es.logger.level", Level.INFO.name());
        final Settings settings = Settings.builder().put("logger.level", loggerLevel).build();
        LogConfigurator.configureWithoutConfig(settings);
    }
    /**
      * Required method that's called by Apache Commons procrun when
      * running as a service on Windows, when the service is stopped.
      *
      * http://commons.apache.org/proper/commons-daemon/procrun.html
      *
      * NOTE: If this method is renamed and/or moved, make sure to
      * update WindowsServiceInstallCommand!
      */
    static void close(String[] args) throws IOException {
        command.close();
    }
}