Skip to content

Instantly share code, notes, and snippets.

@mihaimyh
mihaimyh / self-signed-certificate-with-custom-ca.md
Created December 3, 2019 09:06 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@mihaimyh
mihaimyh / Service KMS
Created January 6, 2021 20:38 — forked from judero01col/Service KMS
Volume License Activation Key Service - KMS
## Find Available Target Editions
DISM.exe /Online /Get-TargetEditions
## Convert Server Standard 2019 Evaluation to Server Standard 2019
DISM /online /Set-Edition:ServerStandard /ProductKey:N69G4-B89J2-4G8F4-WWYCC-J464C /AcceptEula
## How To Activate
slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
slmgr /skms [server]:[port]
slmgr /ato
@mihaimyh
mihaimyh / Program.cs
Created February 18, 2022 20:57
Get Active Directory groups for an user
using Novell.Directory.Ldap;
var ldapMnanger = new LDAPManager();
ldapMnanger.GetUserGroups("mihai", new LdapConnectionDetails("local.ad", "local\\user", "password"));
public class LdapConnectionDetails
{
public LdapConnectionDetails(string hostName, string username, string password, int port = 636)
{
HostName = hostName;