Your basic ITPro blog... What's going on at work, what I'm interested in.

Wednesday, August 20, 2008

Rabbit Hole... Or Dominoes...

Hey there... I saw this little PoSH script on one of the blogs I track... (Minor tweaks made by me)

-------------------

$Printers = Get-WmiObject `
    -Class Win32_PerfFormattedData_Spooler_PrintQueue `
    -ComputerName 'ServerName' `
    -Filter 'Name <> "_Total"'
foreach ($Printer in $Printers) {
#    if($Printer.Jobs -ge 10) {
        Write-Host $Printer.Name $Printer.Jobs
#    }
}

-------------------

It uses WMI to poll the print queues on a computer.

This got me looking at What's Up Gold. I knew you could set up WMI monitors in WUG, but have never done so. So, I created some monitors in WUG that monitor these same WMI items.

I am curious to see how these look/work over a weekend as we run our check-in system through its paces.

Cool, though, how one technology makes you think of how you might use another technology differently. I had never really looked in to using WMI monitors in WUG. But, as I have been learning more about PoSH, I have been increasingly exposed to WMI. Fun!

1 comment:

The Cybernetic Entomologist said...

WMI Monitors in WUG are a very happy thing.

Thanks for the code snippit, I think I might be able to make use of that (also for check-in)

Additional Info

My photo
email: support (AT) mangrumtech (DOT) com
mobile: 480-270-4332