|
Replies:
2
-
Pages:
1
-
Last Post:
Oct 11, 2007 12:56 PM
by: BSonPosh
|
|
|
Posts:
1
Registered:
10/9/07
|
|
|
|
Script Request: AD Computer Objects Manager
Posted:
Oct 9, 2007 3:10 PM
|
|
|
I need a script that polls AD for Computer Objects then with that list it pings them by name. If the pings fail then move that Computer Object to a Different OU that I would check and clean out myself.
Thanks, Ben
|
|
|
Posts:
1,151
Registered:
12/1/06
|
|
|
Posts:
10
Registered:
10/11/07
|
|
|
|
Re: Script Request: AD Computer Objects Manager
Posted:
Oct 11, 2007 12:56 PM
in response to: Dmitry Sotnikov
|
|
|
While I appreciate the trackback, I should warn that Test-Port isn't really a ping. It just makes a TCP Socket connection to a given port (135 RPC by default.) If you want a ping I use the function below for that. It is an actual ICMP ping. Test-Port is great if your company blocks pings or you want to specify a timeout, also the port is configurable.
function Ping-Server { Param([string]$server) $pingresult = Get-WmiObject win32_pingstatus -f "address='$Server'" if($pingresult.statuscode -eq 0) {$true} else {$false} }
|
|
|
|
Legend
|
|
MVP: 2501
+
pts
|
|
Guru: 2001
- 2500
pts
|
|
Expert: 751
- 2000
pts
|
|
Enthusiast: 31
- 750
pts
|
|
Novice: 0
- 30
pts
|
|
Moderators
|
|
Helpful answer
(5 pts)
|
|
Answered
(10 pts)
|
|