$Cert_Domain = "testcert.ksi.kiev.ua"
New-SelfSignedCertificate `
-Subject "$Cert_Domain" `
-DnsName "$Cert_Domain" `
-CertStoreLocation “cert:\LocalMachine\my” `
-KeyAlgorithm RSA `
-KeyLength 2048 `
-KeyExportPolicy Exportable `
-NotAfter (Get-Date).AddYears(10)
https://moriyama.co.uk/about-us/news/blog-how-to-create-a-self-signed-certificate-for-your-local-iis-website/#
1) After that export this cert to pfx
W+R --> mmc- > local cer computers -> to pfx
2) Import pfx cert to local PC to Domain trust