##Make Sure to the following commands on AD and Run as administrator
##How to query inactive computers in AD And increase the View limit
open CMD then
dsquery computer -inactive 8 -limit 400″### How to disable the inactive computers
OPen CMD then
“dsquery computer -inactive 8 -limit 400| dsmod computer -disabled yes”
###If you need to target a specific OU, simply place DN of the OU after the computer:
“dsquery computer “OU=Build,DC=Domain,DC=com” -inactive 8 | dsmod computer -disabled yes”
dsmove “cn=computer
**************************
##How to query inactive computers in AD And increase the View limit
open CMD then
dsquery computer -inactive 8 -limit 400″### How to disable the inactive computers
OPen CMD then
“dsquery computer -inactive 8 -limit 400| dsmod computer -disabled yes”
###If you need to target a specific OU, simply place DN of the OU after the computer:
“dsquery computer “OU=Build,DC=Domain,DC=com” -inactive 8 | dsmod computer -disabled yes”
dsmove “cn=computer
**************************
To find out detailed information about a user account: net user username
C:>net user etbain
********************
###To find out where (which OU) a user account resides in ADS:
dsquery user -samid username
*******************************
##to get the list of users who hasnt been active for the last 16 week
dsquery user -inactive 16 | dsget user -dn
****************************************************
## how to know on whcih DC the users has been authenticated
From Command prompt
ECHO %LOGONSERVER%
Hi friends,Active Directory is a structure used on computers and servers running the Microsoft Windows operating system. Thanks for sharing it……
LikeLike
Thanks for this Info but i always run it from AD causeo i log in to the DC with my Domain Admin Account any way you can run it from both DC and PC but make sure to have the right permissions
LikeLike