Posted On March 31, 2019

Quick 1-liner Generate List of Active Directory users

kimconnect 0 comments
blog.KimConnect.com >> Codes >> Quick 1-liner Generate List of Active Directory users
# Discover domain controller:
echo %LOGONSERVER%

# Display Users:
dsquery user -limit 0 | dsget user -display -dept -title

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

PowerShell RandomPassword Function

function randomPassword{    # return a reasonably randomized password that starts with "KimConnect:" plus 25…

PowerShell: Install RSAT

What problem does this solve? dcdiag /test:dns dcdiag : The term 'dcdiag' is not recognized…

PowerShell: Creating Active Directory Accounts from CSV File

# User-input Variables $csvFile='C:\Users\rambo\Desktop\newUsers-finalized.csv' $newOu='CN=Users,DC=kimconnect,DC=com' $newCompany='KimConnect.com' $logFile="c:\temp\createActiveDirectoryAccounts-$(get-date -f yyyy-mm-dd-hh-mm-ss).txt" function createActiveDirectoryAccounts{ param( $csvFile, $newOu, $newCompany,…