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: Start-Job, Get-Job, Receive-Job Examples

Demo 1: Obtain Public IP of a Windows Machine # Commands to run locally$command1={(Invoke-WebRequest -URI…

PowerShell: SMB Shares Migration

$object='\\fileserver\sharename' $identity='domain\account' $permissions='Full' function importNtfsSecurity{ try{ set-executionpolicy unrestricted -force # Include the required NTFSSecurity library…

PowerShell: How to Call a Batch File to Run-As Administrator

Step 1: Create a Batch File and place it inside C:\scripts @echo off powercfg.exe -x…