Skip to content

Examples

Sean Stark edited this page May 15, 2017 · 2 revisions

Basic Steps

  1. Suggested that you trust all certificates

    Enable-TrustAllCertificates

  2. Create a new Basic Authentication Credential

    $Cred = New-BasicAuthCreds -Username domain\username -Password P@ssw0rd

  3. Create a new SolarWinds Session

    $WebSession = New-SWSession -ServerName 'solarwinds.test.com' -Credential $Cred -ServerPort '6751'

  4. Read the Module Help Get-Help function-name

Basic Examples

Get the first 10 entities

$WebSession | Get-SWEntities

Returns all metrics for a specified entity

$WebSession | Get-SWEntityMetrics -EntityId 0_Orion.Nodes_2055

Gets the CPU MaxLoad for an entity for the last hour

$Start = (Get-Date).AddHours(-1)

$End = Get-Date

$WebSession | Get-SWMeasurement -EntityId 0_Orion.Nodes_2055 -MetricId Orion.CPULoad.MaxLoad -StartDate $Start -EndDate $End

Returns all relationships for a specified entity

$websession | Get-SWEntityRelationships -EntityId 0_Orion.Nodes_2055

Clone this wiki locally