Configuring for Cert in LocalMachine Store

Product: PowerShell Universal
Version: 1.4.6

@adam recommend adding this to the docs, it’s not very clear how to do it and the ASP.NET docs it is hard to find.

Put this in your appsettings.json

  "Kestrel": {
    "Endpoints": {
      // "HTTP": {
      //   "Url": "http://*:5000"
      // },
      "HTTPS": {
        "Url": "https://*:443",
        "Certificate": {
          "Subject": "",
          "Store": "My",
          "Location": "LocalMachine"

Subject is the least clear, it took a few tries to figure out it’s not the entire DN, it’s just the common name minus the CN= part of the subject.

It’s in the doc here but I’ll add the tid bit about the CN.

1 Like

My bad! I think it wasn’t there last I checked, thanks!