Episode 143 – Chris Harris from Microsoft on SCOM 2012


A Podcast about Windows PowerShell.

In This Episode

Tonight on the PowerScripting Podcast, we talk to Chris Harris from Microsoft about System Center Operations Manager 2012!


This segment is brought to you by PowerGUI Pro with MobileShell, Version Control, and Easy Remote Script Execution.

At Quest we are passionate about Windows PowerShell. PowerGUI Pro enables organizations to harness the power of PowerShell without the expense of training and custom scripts and applications. PowerGUI Pro solves issues regardless of the time and place by using MobileShell to remotely manage your infrastructure. Ensure scripting best practices by leveraging integration with popular Version Control systems. Automate against thousands of computers using Easy Remote Script Execution. Get PowerGUI Pro at quest.com/powerguipro


This segment brought to you by Start-Automating


Start Scripting to Your Fullest Potential.  At Start-Automating, we can help you unleash the full Power of PowerShell V2.  You can use our deep PowerShell expertise to build rich PowerShell solutions, or we can train you to use PowerShell like a pro. Isn’t it time you Save-Time, Save-Money, and Start-Automating?  Find out more at Start-Automating.com.




Chatroom Buzz:

21:47 <Start-Automating> ## are you deprecating or removing your old commands?

21:50 <RavikanthChaganti> ## Is there a way we can pull the OpsMgr alerts and perf numbers from a VISIO diagram? 
21:52 <esacteksab> ## monitoring other devices, any intentions for storage arrays?  NetApp has Powershell SDK. 
21:52 <esacteksab> ## F5 BigIP also supports PowerShell, any intention to hook inot that API?
21:56 <treym1112-1> ## Will SCOM 2012 deliver any new features associated with monitoring cross platform?
21:58 <treym1112-1> ## Does the new 2012 design and the removal of the Root Management Server provide support for a larger number of Windows and Web Console users? 
Superhero: Jesus





This segment brought to you by ServerFault.com


This one is from Aaron Nelson aka SQLVariant:
I have a PowerShell question for you gurus. I know precisely how to do this in SQL, but I’m only kinda-sure how to do this in PowerShell.
My question is how do you contain an OR to only a certain portion of a Where-Object? In SQL all you have to do is put parens around the clauses and that will make their results act as one ‘where’ clause. In PowerShell all I could think to do is to break it up into multiple Where-Object statements. There has to be a better way to do this right?
SQL Example:
       OR NAME LIKE ‘Reporting%’)
   AND StartMode = ‘Auto’
   AND Started != ‘True’
PowerShell Example (that doesn’t work)

Get-WmiObject win32_service -ComputerName AARON |
Where {$_.name -match “^*SQL*” -or $_.name -match “Report”} |
Where {$_.StartMode -eq “Auto” -and $_.Started -ne “True”} |
Select SystemName, Name, StartName, Started, StartMode | Ft -a

Hal’s answer: 

Review the Operator Precedence help page, you’ll see that -and -or are near the bottom, so you need parentheses to make this work. For example:
get-stuff | ? { ($_ -gt $x) -and ($_ -ne $y) }

Comments are closed.