Find knowledge base article(s) by searching for keywords in the title e.g. type linux in the search box below
Find knowledge base article(s) by browsing the subject categories of articles
Technology quick references, cheatsheets, user manuals etc.
Shop Online through ShopifyLite
Tutorials on various IT applications.
Search Title    (UL:0 |SS:f)

Software >> OS >> Windows >> Command Line >> How to use dsquery tool to check whether a username exist in active directory

@echo off set userdomain=%1 set username=%2 set CN="" for /F "delims=" %%a in ('dsquery user dc^=%userdomain%^,dc^=main^,dc^=ntu^,dc^=edu^,dc^=sg -samid %username%') do set CN=%%a% rem echo. rem echo %userdomain%\%username% rem echo %CN% rem echo. if %CN%=="" ( echo %userdomain%\%username%^|N ) ELSE ( echo %userdomain%\%username%^|Y )
[ © 2008-2021 myfaqbase.com - A property of WPDC Consulting ]