Tag Archives: powershell

Scom Agent Proxying

2 simple powershell commands to enable or disable proxying for scom agents in your management group:- ENABLE Get-SCOMAgent | where {$_.ProxyingEnabled.Value -eq $False} | Enable-SCOMAgentProxy -Confirm   DISABLE Get-SCOMAgent | where {$_.ProxyingEnabled.Value -eq $True} | Disable-SCOMAgentProxy -Confirm

Posted in Misc Stuff | Tagged , , , , , , , , , , , | Leave a comment

Open Alerts but Health Explorer shows Healthy

On occasions you can run into a situation where SCOM shows open alerts in the console (with a warning or error condition), but  when you open Health Explorer it shows that the monitored object is actually Healthy!?? Here’s a quick … Continue reading

Posted in Misc Stuff, Powershell for SCOM | Tagged , , , , , , , , , , , | Leave a comment

Install AD powershell module on Windows Server 2008 R2

Installing the module on Windows Server 2008 R2 Install the module from a PowerShell console:- Import-Module ServerManager Add-WindowsFeature RSAT-AD-PowerShell After the module has been copied to your computer, you then have to import it: Import-Module ActiveDirectory

Posted in Misc Stuff, Powershell for SCOM | Tagged , , , , , , , , , | Leave a comment

Script to put a group into maintenance mode

Create a group with your servers in it, if you are dynamically adding the servers into the group then as a safeguard add your SCOM management servers to the Excluded Members tab If you like you can set this script … Continue reading

Posted in Misc Stuff | Tagged , , , , , , , , , , , , | Leave a comment

Scom monitored computers processor count

Here is a handy little powershell one-liner which will  output the number of logical and physical processors for machines in your scom management group which may come in handy for doing a licence audit Get-SCOMAccessLicense | measure-object -property LogicalProcessorCount,PhysicalProcessorCount -sum … Continue reading

Posted in Powershell for SCOM | Tagged , , , , , , , , , | Leave a comment

Quick and Dirty Network Latency Graph in Powershell

I was on a project recently where I was unable to access (and therefore monitor) any of the networking equipment and the WAN links thereof. Noticing that the issues that were occurring were due to a network problem I spoke … Continue reading

Posted in Non SCOM Techy Stuff | Tagged , , , , , | Leave a comment

MP reference cleanup from unsealed MP

Stumbled upon this really cool stand alone powershell script by Tao Yang that removes obsolete references from unsealed SCOM management packs. link to script There is another version available by Matthew Dowst but the differences in the versions are as follows:- … Continue reading

Posted in Management Packs, Powershell for SCOM | Tagged , , , , , , , , , , , , | Leave a comment

List all computers with a particular active alert

Here is the powershell, you need to amend the management server and the alert details to meet your requirements. Save as a .ps1 file and run in an Operations Manager Shell.   Import-Module OperationsManager New-SCOMManagementGroupConnection -Computername “SCOM MGMT SERVER”  #Get … Continue reading

Posted in Powershell for SCOM | Tagged , , , , , , , , , | Leave a comment

Listing your IE Favorites (with URL) with Windows PowerShell

Launch powershell and paste the following command to list your IE Favourites with their corresponding URL gci -path ([Environment]::GetFolderPath(“Favorites”)) -recurse | ? {$_.Length} | % {$_.BaseName; Get-Content $_.FullName -ea silentlycontinue | Select-String ^url=*| %{$_ -replace “^url=”,”” ;””}}

Posted in Non SCOM Techy Stuff | Tagged , , , , , , , | Leave a comment