Monday, February 10, 2025

Random- finding users in DB and validate in AD

 first generate the list of DB users to the file for 10.11 and save to a text file in a location


open CMD

cd to the save txt file location and run below command.


for /f %i in (user_list.txt) do (echo %i & net user /domain %i |findstr Full) >>"user_log_output_2.txt"


for /f %i in (list-users.txt)

do 

command=

(echo %i & net user /domain %i |findstr Full) >>"user_log_output_2.txt"

No comments:

Post a Comment

PostgreSql: Useful Commands-

 1)   ************************* Users ***************************  -- List of users with roles assigned: SELECT usename AS role_name,   CASE...