Jump to content
Welcome to our new Citrix community!

Export list of lb with name and up from CLI from netscaler


Recommended Posts

It seems from your question that in addition to the names of the lb servers, you want to know the UP/DOWN status of each.

The easiest way to get that information is to use the NetScaler PowerShell module in the PSRepository.

 

From an elevated PowerShell session:

Install-Module -Name NetScaler -RequiredVersion 1.5.0

(if Install-Module is not recognized, you'll need to download the PackageManagement module).

 

Then, to get the list of LB vServers and their status, simply execute: (replace the NSIP & password on the first line below):

$NSIP, $Username, $Password = "NS management IP", "nsroot", "password"
$securePW = ConvertTo-SecureString $Password -AsPlainText -Force
$creds = New-Object System.Management.Automation.PSCredential ($Username, $SecurePW)
Connect-NetScaler -Hostname $NSIP -Credential $creds -passthru
Get-NSLBSSLVirtualServer | Select name, curstate, effectivestate | ft -auto
Disconnect-NetScaler

 

There's much more that the NetScaler module can do, of course.

To disable a vServer, use the CLI command that Carl mentioned above via PuTTY.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...