# We will need a param from the Diagnostic Server grid to pass in here
$ServerName = $selectedServer #get the server name passed from top DS grid
[bool] $DisplayAgentAlarmsOnly = 0 #0=False,other than 0 = True... Param(2) #pass in whether we want to display agent alarms only
if ($ServerName -ne $NULL -and $ServerName -ne "")
{
#Instantiate a dsConnections class and get all the instances related to it
$dsConnClass = Get-SCOMClass -Name Quest.SoSSE.Connections
$dsConnClassInstances = Get-SCOMClassInstance -Class $dsConnClass
foreach ($dsConnClassInstance in $dsConnClassInstances)
{
if ($dsConnClassInstance.'[Quest.SoSSE.Connections].DSName'.value -like $ServerName)
{
# if ($dsConnClassInstance.'[Quest.SoSSE.Connections].TechnologyType'.value -ne "Diagnostic Server")
# {
$dataObject = $ScriptContext.CreateFromObject($dsConnClassInstance, "Id=Id,DisplayName=DisplayName,InMaintenanceMode=InMaintenanceMode", $null)