Citrix powershell scripts you use in daily basis

Yeah, every place I work I've built them a bit different to fit what's needed in the environment. But it's a series of collection scripts that go get data in custom array list objects and then dumps it to XML files. This parts out data gathering so they're independent and allows other people to use the XML if they like for whatever.

For display, I currently throw it all up into HTML pages which are just tables with nested tables. I need to move this to CSS but I'm not very savvy with that so I'm building that on the side.

The main page has basic stats for user connections, state, and time in session, user profile stats, the delivery groups and all the state information for each, and I like to have VMware summary data for hosting. All color coded so at a glance things are ok, yellow, or red by metrics for each set of data.

For the server page, it's a list of all systems in AD and it lists out hostname, DHCP, OS, Uptime, timezones, compute config, key services (these are just slapped in a csv and for each server if it has the service it lists the name, the state color coded, and below it the account it's using), security tools versions and statuses, SCCM versions and stats, and of course drives and space availability.

I have PVS pages for image stats and version info too.

Rinse repeat for target devices, hosting, and whatnot. For each page I try to have one or more collectors for data, and an assembly script dedicated to that page, so each page is independent. Under each table I put a little footer with the last pull, which is the timestamp of the raw data XML, so I know at a glance how old the stuff is or if one maybe got stuck. And on each display I try to do loops for each section so I can color code the html based on the data...green/yellow/red either text or the entire cell, depending on what fits (drives are the whole cell, services are text since services all are in the same cell).

Since this is ported to other networks (government land) I try to keep the same core setup across each network, and if I add something to one I add it to the others regardless of usefulness, so they are as customized as needed by the team or mgmt, but also as identical as possible to each other for my own sanity.

Moving forward I'd rather use something like Powershell Universal Dashboard, and get away from HTML and my fanny-pack HTML, but I'm not there yet. We also are incorporating ControlUp, so I'd like to compliment that vs reinvent the wheel. If I could move things like drive monitoring over to that, and use my scripts to trigger notifications instead, and provide reporting vs. trying to dashboard all the things that'd be good too. But we'll see. I sort of just shift in whatever direction the team needs at any point in time and then build off of what I already have.

/r/Citrix Thread Parent