Create a 1-year (default) self-signed certificate for 192.168.0.1. We add the IP Address=192.168.0.1 as SAN
New-SelfSignedCertificate -Subject 192.168.0.1 -TextExtension @("2.5.29.17={text}IPAddress=192.168.0.1")
Create a 1-year (default) self-signed certificate for localhost. We add the IP Address=127.0.0.1 and DNS=localhost as SAN
New-SelfSignedCertificate -Subject localhost -TextExtension @("2.5.29.17={text}DNS=localhost&IPAddress=127.0.0.1")