Tag Archives: powershell

Testing Port Connectivity with Powershell

From Windows Server 2012 R2 and above you can use the test-netconnection command in Powershell to test port connectivity The syntax is:- test-netconnection <servername> -port <port number> example:- test-netconnection myserver -port 5723  Advertisements

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

Monitoring Windows Event Logs…..without using SCOM!

If someone does not have SCOM but wants to monitor Event Logs for a particular event then this can also be achieved using the Task Scheduler to run powershell script. In the example below we are using Event ID 47 … Continue reading

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

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