Solved

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

Posted on 2014-12-29
2
181 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 500 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 7

Author Comment

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

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

A procedure for exporting installed hotfix details of remote computers using powershell
A brief introduction to what I consider to be the best editor for PowerShell.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

831 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