Compellent PSCS One-Liner Coding: Tip #2

With Compellent Storage Center 5, you have the ability to control whether an alert is generated for individual servers when connectivity changes.

This means when your server reboots or you switch around cables (in your lab environment of course), these alerts are triggered and show up in the system alerts as well as the GUI which presents a “stop light” that isn’t green.

You can control this connectivity per server in the Storage Center Manager, or perhaps you want to disable it for all of your lab servers.  Here’s a simple way to do so.  In this example I take the servers that are in my folder on the Storage Center and turn off their connectivity alerts.

Get-SCServer -ConnectionName SC5 | ?{ $_.ParentFolder -eq "Justin" } | { Set-SCServer -Index $ _.Index -EnableConnectivityAlert:$false -ConnectionName SC5 }

Beginner hints: The usage of “?” in PowerShell is synonymous with “where”.  We use this to filter the Get-SCServer cmdlet in the above example.  Additionally, “%” is synonymous with “for-each”, also used in the example.