Home > OM12 Powershell, Operations Manager 2012 RC > OM12 RC – GET-SCOMAGENT

OM12 RC – GET-SCOMAGENT

One of the changes from SCOM 2007 to SCOM 2012 is the cmdlet names have changed a bit. Outside of that it SEEMS that the parameters for some of the more used cmdlets have not changed much either. If I run into any huge ones I’ll definitely bring it up in a post. Were going to take a look at the GET-SCOMAGENT cmdlet today.

Running it with out any parameters will get you a list of agents in the management group your connected to.

PS C:\> get-scomagent

WARNING: 2 columns do not fit into the display and were removed.

HealthState DisplayName                                    Version       ActionAccountIdentity
———–    ———–                                               ——-       —————–
Success     mdbqa01.qa.net                              7.0.8443.0    SYSTEM
Success     mdbqa02.qa.net                              7.0.8443.0    SYSTEM
Success     OMVNEXTQA02.qa.net                     7.0.8443.0    SYSTEM

To figure out what you can check out with this cmdlet pipe the get-scomagent | GM and you will see the properties and methods available for that cmdlet. The properties are listed below.

ActionAccountIdentity Property

AuthenticationName Property

CommunicationPort Property

ComputerName Property

CreateListener Property

DisplayName Property

Domain Property

HealthState Property

HeartbeatInterval Property

HostComputer Property

HostedHealthService Property

Id Property

InstalledBy Property

InstallTime Property

IPAddress Property

LastModified Property

ManagementGroup Property

ManagementGroupId Property

ManuallyInstalled Property

MaximumQueueSizeBytes Property

MaximumSizeOfAllTransferredFilesBytes Property

Name Property

NetworkName Property

PrimaryManagementServerName Property

PrincipalName Property

ProxyingEnabled Property

RequestCompression Property

Version Property

Just like SCOM 2007 and powershell version 1, you can sort, and filter on the properties.

PS C:\> get-scomagent | where-object {$_.DisplayName -like “mdbqa*”} | ft displayname, Proxyingenabled

DisplayName                 ProxyingEnabled

———–                       —————

mdbqa01.qa.net           True

mdbqa02.qa.net           True

Good news is that bulk enable proxy PowerShell scripts like the one Kevin Holman did, works with one modification, changing the cmdlet name to reflect the new name GET-SCOMAGENT.

$NoProxy = get-scomagent | where {$_.ProxyingEnabled -match “False”}

$NoProxy|foreach {$_.ProxyingEnabled=$true}

$NoProxy|foreach {$_.ApplyChanges()}

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: