Cannot Access On-Premise Environments Through Browsers

As long as the self-signed cert is in trusted authority you can use fine in Edge or Chrome.

PowerShell script to create and install self-signed cert. Just need to create proper binding in IIS after creation.

param (
     [Parameter()]
     [string]$certname=$($env:COMPUTERNAME),  ## Identify the Host this cert is being generated for if not supplied.
     [Parameter()]
     [string]$dnsname=$($env:COMPUTERNAME+"."+$env:USERDNSDOMAIN ) ,  ## Build a fqdn we hope if one is not supplied.
     [Parameter()]
     [string]$pwd = "Please set a password!",
     [Parameter()]
     [string]$path = "C:\certs"  ## Default path to store generated certificate(s)
     )

$dnsname = $($dnsname).ToLower()
$mypwd = ConvertTo-SecureString -String $pwd -Force -AsPlainText  ## Private Key password
$cert = New-SelfSignedCertificate -Subject "CN=$certname" -CertStoreLocation "Cert:\localmachine\My" -KeyExportPolicy Exportable -KeySpec Signature -KeyLength 2048 -KeyAlgorithm RSA -HashAlgorithm SHA256 -DnsName $dnsname -NotAfter (Get-Date).AddYears(2)  
Export-Certificate -Cert $cert -FilePath "$path\lm_$certname.cer"   ## Specify your preferred location
Export-PfxCertificate -Cert $cert -FilePath "$path\lm_$certname.pfx" -Password $mypwd   ## Specify your preferred location
$certfile = (Get-ChildItem -Path "$path\lm_$certname.cer")
$certfile | Import-Certificate -CertStoreLocation cert:\LocalMachine\Root ## Install into Trusted Root
Echo ""
Echo "Please remember to install into IIS and set the bindings for SSL and attach to this cert."
3 Likes