Skip to content

Tag: View

PowerCLI – View – Pool Health Check Report

I’ve been given the chance to work with View a little more here recently and focus in on some of the gaps that are missing, specifically around reporting and alerting. vC Ops and the View adapter are in use, however the alerts leave much to be desired. I’m glad to be able to say that the gaps are filled in with the new version, and new title, of vR Ops and the View adapter but this environment is not yet to that point.

Examples of the vR Ops alerts which are included by default:

vR Ops Default View Alerts

What gaps am I referring to? I’m aiming specifically at the View Pool state, provisioning state and the amount of available desktops compared to the headroom configuration.

To do this, I enlisted the help of the View PowerCLI cmdlets and the View Connection server ADAM database to create the script below that creates an output similar to this:
(Note: the asterics around the value that caused the report to be sent)

View Pool Report Output

Before getting to the script, lets cover some of the requirements of the script:

  • This script is to be run from a Connection server.
  • This script is currently formatted to have the report be consumed by way of email.
  • The email variables need to be filled in to match the environment it’s being run in.
  • The email is sent only if the following criteria are met:
    • A Pool’s state is false.
    • A Pool’s provisioning state is false.
    • A Pool’s available desktops are less than the headroom setting by the amount set in the desktopthreshold variable.
  • The default desktop threshold is meant to be a percentage and is set to a default of 90%, or 0.9. This is easily modified on line 22.

Note: this was a script that worked in my environment. There is no warranty or support with this script, please use at your own risk.

View – Using Powershell to Check ADAM Replication Status

Recently ran into some issues where replication on the View ADAM database wasn’t going too well. Instead of checking the replication status by RDPing into each View Connection and running the repadmin command, I created a Powershell script to do it for me. This script also helped with verification due to being able to report all the Connection servers’ status within a single window.

Only item to note: you will have to prepopulate the script with the desired Connection servers

I also converted the above into a little more automated script that’s usable only from one of the Connection servers, thanks to how the View API ties into PowerCLI…

Items to note:

  • This has to be run through the View PowerCLI module, which only works on Connection servers.
  • It’s designed to be run as a one liner.
  • It will report back the replication status on all the Connection servers involved in that particular View environment.

Note: this was a script that worked in my environment. There is no warranty or support with this script, please use at your own risk.