XenApp - Find server with no sessions
Sometimes you might need to find a server with no sessions.
If you have a larger environment, it’s a tedious task to go through every single server to find out. Here is a very quick script to ascertain servers with no sessions:
Let’s assume that we are only looking for servers that meet certain hostname requirements - such as servers with a ‘2’ in their name (or part of LMG2 as example)
For some reason, the WP-code snapin doesn’t deal with “<=” at all? The above results indicate the server name “CONTOSO-CTXXA-P245” exists in the $servers variable, but not the $sesisons variable.