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 FOR loop and wmic to get last logon information of all users

 

 

for /F "tokens=1 skip=1" %a in ('wmic useraccount get name ^| findstr /r /v "^$"') do @echo %a & @net user %a | findstr /R "Last logon"

Note: the above command enter in a single line. 

 

[ © 2008-2021 myfaqbase.com - A property of WPDC Consulting ]