DSQUERY to find user not logged in for 120 days
I need some help to find out a syntax for dsquery that can show me the number of users how are not logged in for some 120 ways. Then I want to export the output on a Excel sheet. I am having multiple domain controllers here. I want to check all of them one by one. But somehow I found the process bit complicated and cannot found a working solution for the same.
re: DSQUERY to find user not logged in for 120 days
Try the following : dsquery user domainroot -name *smith -inactive 18. I am sure you would be able to understand the syntacx. Here you can find out the information on the basis of last name of users and for how much time the user is inactive. Later it is possible for you to export a txt find out of the same. You can use >c:\textfile.txt. That's all.