DIR Return Create A Forum - Home
---------------------------------------------------------
Infrastructure Services
HTML https://infrastructureservices.createaforum.com
---------------------------------------------------------
*****************************************************
DIR Return to: Powershell
*****************************************************
#Post#: 24--------------------------------------------------
Fetch LDAP Details
DIR By: udaykirandocs
Date: October 22, 2019, 4:24 am
---------------------------------------------------------
1. You have one input variable $username, assign value to it
using Read-Host, this is used to get data at runtime from user.
2. From the above variable, if the user provides like this
domainsite1.uk\uday1 then create a new variable as below.
$ldap = "LDAP://DC=domainsite1,DC=uk"
if like this: domainsite1\uday1
$ldap = "LDAP://DC=domainsite1,DC=com"
#Post#: 26--------------------------------------------------
Re: Fetch LDAP Details
DIR By: uday
Date: October 22, 2019, 5:44 am
---------------------------------------------------------
I kept .uk as an example
What I mean is to add the extension mentioned to DC= or if
extension not provided, use "com" there.
#Post#: 27--------------------------------------------------
Re: Fetch LDAP Details
DIR By: udaykirandocs
Date: October 23, 2019, 5:51 am
---------------------------------------------------------
This is the solution for your reference.
HTML https://powershellscriptingsiteblog.wordpress.com/2019/10/23/how-to-check-domain-credentials-using-powershell/
*****************************************************
Page 1 of 1