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

Set Permissions of NTFS/SMB Directories Recursively

# Set variables here$proxy="http://proxy:80"$directories="\\FILESERVER01\dept01$","\\FILESERVER01\dept02$"$grantAccess="KIMCONNECT\SysAdmins"$access="Full"# Run as$username = "kimconnect\kim"$password = "PASSWORD"#$username = "kimconnect\"+(Read-Host -Prompt 'Input the…

PowerShell: Enable CredSSP on Windows

PowerShell: # Enabled WinRMEnable-PSRemoting -Force# Enable CredSSPEnable-WSManCredSSP -Role Server -Force Legacy Command Line: # Enable…

PowerShell: Moving Guest VMs in Hyper-V in Conjunction with Microsoft Failover Cluster

This code is outdated. Refactor before reuse.. ############################################################################################################### # HyperV-MoveVM.ps1 # Assumption: Hyper-V has been…