Senin, 14 Februari 2011

Powershell - Powertips: Comparing Services

I get emails from powershell.com that are worth sharing (and remembering). These are not my scripts. Signup for daily PowerTips here: http://powershell.com/cs/.

Compare-Object can help when troubleshooting computers. For example, you should try this to compare the service status on two machines and find out where services are configured differently:

$machine1 = Get-Service –ComputerName server1-or-IP1
$machine2 = Get-Service –ComputerName server2-or-IP2
Compare-Object –ReferenceObject $machine1 –DifferenceObject $machine2 –Property Name,Status –passThru | Sort-Object Name | Select-Object Name, Status, MachineName

1 komentar:

Unknown mengatakan...

I am very happy to read this article..thanks for giving us this useful information.
Buy Apple Accessories India .

Posting Komentar

 
Powered by Blogger