Posted by daro
on June 05, 2014
Searching large network shares might be slow, but there is a better way!
I’ve recently came across interesting challenge of finding one particular document among thousands of others spread across multiple folders. Windows search function wasn’t up to the task, could not find anything and because it was a network storage – it was painfully slow. So I remembered a command that I’ve seen on some blog that exports file names along with its path to a simple text file. There comes quick solution for how to search network shares. If your drive is mapped as S: do ‘cd S:’ and the command is:
dir /a /b /-p /o:gen /s > OutputFile.txt
So I opened up this file in a notepad, CTRL+F, entered search string and bam! There it was. Works miraculously! Sometimes simplest solutions are the best.
Posted by daro
on June 03, 2014
Finding password age in Active Directory doesn’t have to be all that complicated
1. Net user
Open up command prompt and issue following command:
net user username /domain
Where username is an AD logon name of a user. Output of this command should look like this:
Last logon entry visible in above screenshot can also be found in ADUC by navigating to user’s account and going to Attribute Editor tab as below:
There is a controversy over which attribute should be used, whether it should be lastLogon or lastLogonTimestamp. In my case lastLogon attribute is more accurate. Another quick way to do this is to use Lockout status tool provided by Microsoft.
2. Lockout Status tool
Bear in mind that in order to use this tool on a client machine rather than a server you would have to have RSAT installed.