Search for Computer Objects in AD since they last checked in

Need to use a Powershell script to query Active directory for Computer objects that have not connected to Ad for over 120 days .
and the results should say the name of the device and total number of days its been Offline
Who is Participating?
Mal OsborneAlpha GeekCommented:
Not Powershell, however Windows Server since at least 2008 has included a command line utility to do that.

At a command prompt, just type Dsquery computer -inactive 17

This will spit out names of all computers that have not authenticated for 119days (17 weeks). It does not included the actual last date, but you can do successive queries to get lists with differing cut offs.
PberSolutions ArchitectCommented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Accept: Mal Osborne (https:#a42412557)

If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

Experts-Exchange Cleanup Volunteer
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.