How to search for files on a Windows machine with the command line. And some other useful tricks.

This command will search a directory recursively to find files matching a pattern.

C:\Users\Homer>where /R C:\Users\homer\Documents *.txt
C:\Users\Homer\Documents\age-of-ultron-script-outline.txt
C:\Users\Homer\Documents\windows10key.txt
C:\Users\Homer\Documents\Downloads\Linux The Complete Manual 2nd Edition (TRUE PDF)\Torrent downloaded from AhaShare.com.txt
C:\Users\Homer\Documents\Downloads\Linux The Complete Manual 2nd Edition (TRUE PDF)\Torrent Downloaded From ExtraTorrent.cc.txt
C:\Users\Homer\Documents\Downloads\Linux The Complete Manual 2nd Edition (TRUE PDF)\tracked_by_h33t_com.txt
C:\Users\Homer\Documents\Downloads\Linux The Complete Manual 2nd Edition (TRUE PDF)\~Get Your Files Here\Important ! Readme.txt

To open task manager easily on Windows 7, press Ctrl-Shift-Esc.

View all local groups on your machine. This is a useful way to view all local groups on the server or workstation.

C:\Users\Homer>Net localgroup
 
Aliases for \\WIN-64K2GIQD3LC
 
-------------------------------------------------------------------------------
*Access Control Assistance Operators
*Administrators
*Backup Operators
*Cryptographic Operators
*Distributed COM Users
*Event Log Readers
*Guests
*Hyper-V Administrators
*IIS_IUSRS
*Network Configuration Operators
*Performance Log Users
*Performance Monitor Users
*Power Users
*Remote Desktop Users
*Remote Management Users
*Replicator
*System Managed Accounts Group_ploc
*Users
The command completed successfully.

View information about a Windows user account.

C:\Users\jason>net user jason
User name                    jason
Full Name                    homer
Comment
User's comment
Country code                 000 (System Default)
Account active               Yes
Account expires              Never
 
Password last set            11/5/2014 10:10:29 PM
Password expires             Never
Password changeable          11/5/2014 10:10:29 PM
Password required            Yes
User may change password     Yes
 
Workstations allowed         All
Logon script
User profile
Home directory
Last logon                   2/21/2015 2:53:54 PM
 
Logon hours allowed          All
 
Local Group Memberships      *HomeUsers            *Users
Global Group memberships     *None
The command completed successfully.

No comments have been made. Use this form to start the conversation :)

Leave a Reply