Skip to content

Instantly share code, notes, and snippets.

@Maarten88
Created March 16, 2017 15:33
Show Gist options
  • Save Maarten88/a4c687986624ded49f82b1ceaf0b46b1 to your computer and use it in GitHub Desktop.
Save Maarten88/a4c687986624ded49f82b1ceaf0b46b1 to your computer and use it in GitHub Desktop.
public static string GetAddHostNamePortCertCommand(string hostname, int port, string thumbprint)
{
return $"netsh http add sslcert hostnameport={hostname}:{port} certhash={thumbprint} appid={Guid.Empty.ToString("B")} certstorename=MY";
}
public static string GetDeleteHostNamePortCertCommand(string hostname, int port)
{
return $"netsh http delete sslcert hostnameport={hostname}:{port}";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment