Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Modifying powershell script to list all old computer in AD which not responding to ping ?

Posted on 2014-12-29
2
Medium Priority
?
204 Views
Last Modified: 2014-12-29
Hi All,

Can anyone here please help me in fixing the one-liner script below to show all offline computers in a certain OU:

Get-QADComputer -SearchRoot "domain.com/Computers" -NotLoggedOnFor 180 -InactiveFor 180 -SizeLimit 0 | Where-Object { (Test-Connection $_ -Count 1 -Quiet) -ne $null }

Open in new window


Thanks
0
Comment
2 Comments
 
LVL 40

Accepted Solution

by:
Subsun earned 2000 total points
ID: 40523198
Try..
Get-QADComputer -SearchRoot "domain.com/Computers" -NotLoggedOnFor 180 -InactiveFor 180 -SizeLimit 0 | Where-Object {-not (Test-Connection $_.Name -Count 1 -Quiet)}

Open in new window

0
 
LVL 8

Author Comment

by:Senior IT System Engineer
ID: 40523208
Wow that's cool and quick
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's recap what we learned from yesterday's Skyport Systems webinar.
A walk-through example of how to obtain and apply new DID phone numbers to your cloud PBX enabled users that are configured in Office 365. Whether you have 1, 10 or 100+ users in your tenant, it's quite easy to get them phone-enabled and making/receā€¦
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question