Whats the easiest way to exclude a drive letter from monitoring (e:) from every server that I've imported?
Easiest? Add v.Caption not starts with 'E:' in your drive alertsProbably not the best, but by far the easiest.
I so bet Adam gave exactly what you want, no alerts on the E: drive, but if you really don't want to collect data, you can remove those volumes. If it's too many to handle manually, use the SDK. GitHub - solarwinds/OrionSDK: SDK for the SolarWinds Orion platform, including tools, documentation, and samples in PowerShell, C#, Go, Perl, and Java. That gives you PowerShell commands and SWQL studio. First I connect to Orion, then pull and display the list of volumes to delete.
$SwisServer = 'orion'Import-Module SwisPowerShell$creds = Get-Credential$swis = Connect-Swis $SwisServer -Credential $creds$SWISQuery = "SELECT V.URI , V.FullName FROM Orion.Volumes V where V.Caption like 'e:%'"$uris = Get-SwisData $swis $SWISQuery$uris | Out-gridview
If you agree that you don't want any, delete the volumes:
$uris.URI | Remove-SwisObject $swis
I thought about adding this - and was thinking "But then if they were rediscovered they'd drop back in, so might need to add as a regular scheduled task or talk about adding drives to the exclusion list... no idea how to do that programmatically yet... hmm.."
I finally got around to attempting this. The "import-module..." command fails. I ran it in the query window of SWQL. It tries to connect to some server that doesn't exist. It appended my domain at the end of the "syngo "server name it was trying to connect to.
SolarWinds.Orion.Web.Authentication.Windows.DirectoryServices - (null) (null) Can't connect to domain 'syngo.xxxx.xxx: System.Runtime.InteropServices.COMException (0x8007203A): The server is not operational.
Import-module is a powershell function not a swql function.There's a bunch of environment-specific stuff but usally you make sure you can connect to powershellgallery, set certificate and tls stuff maybe, trust and install it
$SwisServer = 'orion'
Should be changed to reflect FQDN of my on prem Orion server?