Hi,
I have been trying to get some data back from a SQL database stored proc, i have tried using the ODBC and normal SQL monitors and each I hit various limitations so i decide to fallback to PowerShell 
but I have now hit another problem, the powershell works fine in console running as the impersonated user on my local machine and the server but when put into SolarWinds it doesn't.
I have specified credentials in the monitor and when testing output
xxxxx
Output Result: Not Defined
but when i check the SQL logs i see that its not using the impersonated account specified its using the regular Solar Winds poller Account which wont have access
I have read the help documents and they mention using $Credential to reference the impersonating account on some powershell but how would this be implemented in a connection string?
any ideas? how to use windows authenticated logon? SQL authentication not an option
$SqlConnection = New-Object System.Data.SqlClient.SqlConnection
$SqlConnection.ConnectionString = "Server=xxxxxxxxxxxx;Database=xxxxxxxxxxxx;Integrated Security=SSPI"
$SqlCmd = New-Object System.Data.SqlClient.SqlCommand
$SqlCmd.CommandText = "xxxxxxxxxxxxxxx"
$SqlCmd.Connection = $SqlConnection
$SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter
$SqlAdapter.SelectCommand = $SqlCmd
$DataSet = New-Object System.Data.DataSet
$SqlAdapter.Fill($DataSet) | Out-Null
$SqlConnection.Close()
# SHOW ME WHAT THE SP IS ACTUALLY BRINGING BACK BEFORE THE LOOP
#$DataSet.Tables[0]
$data = $DataSet.Tables[0]
foreach ($data_item in $data.Rows)
{ $code = $data_item[0]
$description = $data_item[1]
$longer_than_a_minute = $data_item[2]
If ($longer_than_a_minute -gt '1') {
Write-Host "Message: $code";
Write-Host "Statistic: $longer_than_a_minute";
}
}