From 49ebbca21970a8dd1e69757e700351d6006cdfd3 Mon Sep 17 00:00:00 2001
From: Jiri Formacek <jiri.formacek@greycorbel.com>
Date: Sat, 19 Dec 2020 10:51:37 +0100
Subject: [PATCH] Update README.md

---
 README.md | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/README.md b/README.md
index bdc0672..790e5a7 100644
--- a/README.md
+++ b/README.md
@@ -83,6 +83,18 @@ $Ldap = Get-LdapConnection -LdapServer ldap.mydomain.com `
   -Credential (Get-Credential) `
   -AuthType Basic
 ```
+
+Basic authentication with distinguishedName - Get-Credential command may not work properly with dn, so we're collecting credential a diferent way
+```powershell
+#get password as secure string 
+$pwd = Read-Host -AsSecureString
+#create credential object
+$cred = new-object PSCredential("cn=userAccount,o=mycompany",$pwd)
+$Ldap = Get-LdapConnection -LdapServer ldap.mydomain.com `
+  -Credential $cred `
+  -AuthType Basic
+```
+
 Kerberos authentication with explicit credentials:
 ```powershell
 #Connects to LDAP server with explicit credentials 
@@ -93,6 +105,7 @@ $Ldap = Get-LdapConnection -LdapServer ldap.mydomain.com `
   -EncryptionType Kerberos `
   -Credential $Credential
 ```
+
 Client certificate authentication and allowing server certificate from CA with unavailable CRL:
 ```powershell
 #connect to server and authenticate with client certificate