Category Archives: Scripting

PowerShell: Friday Script Blitz 2

scripts-powershell-scripts-everywhere

Intro

In my current position I’m getting to do a lot of PowerShell scripting. Typically these are quick scripts for maintenance or finding information about our Citrix environment. I’m posting several here to share.

NOTE: These scripts were written against a XenApp 6.5 environment

check-deedrive.ps1

Iterates though all XenApp Servers in the farm and checks that the D: drive is formatted. I wrote this because we found some existing provisioned servers that had unformatted D: drives attached.

Get it from GitHub

count-usrprof.ps1

Iterates though user’s profile directories and counts number of files in specified sub directory. It produces a CSV report (if the file count is above a threshold you set in the script) and also counts the total number of profiles. Useful for confirming your profile management solution is working as expected.

Get it from GitHub

clean-crashdumps.ps1

Iterates though a list of servers and reports on crashdumps. EdgeSight and Windows can collect crashdumps and if you don’t clear them off, the accumulate. This script will generate a CSV report and delete the dumps if the -delete switch is included.

Get it from GitHub

Thanks for reading,
Alain

PowerShell: Get XenApp Load and Create Report (Again)

load2.jpg

Intro

Nostalgia is ruling movies and TV these days. Mystery Science Theater 3000 has returned from the dead to Netflix. I’m still getting through he first episode, so I’m still withholding judgement. In the spirit of going back to the well and rehashing old ideas, I’ve revisited my XenApp Load/Report script again.

Changes

  • I’ve moved the code to my Github account
  • I’ve removed the Logon Status column and replaced it with the server’s worker group
  • I’ve sorted the report by the Worker Group
  • I fixed the formatting to display all the columns even if the first server was down. Before, if the first server queried by the script was down, then only the servername and status would show for all servers.

The Report

The report can be generated and sent to your browser of choice (the script defaults to Internet Explorer). In addition, you can set the SMTP information in the script have have it emailed.

load1

The Script

Get the script from Github

PowerShell: Friday Script Blitz

everyone-gets-powershell

Intro

In my current position I’m getting to do a lot of PowerShell scripting. Typically these are quick scripts for maintenance or finding information about our Citrix environment. I’m posting several here to share.

NOTE: These scripts were written against a XenApp 6.5 environment.

get-xacmdln.ps1

Lists active published applications’ command lines and working directories based on a search word.

psscriptblitz1a

Get it from GitHub.

get-xawgapps.ps1

Lists active published applications from a designated XA 6.x Worker Group

psscriptblitz1b

Get it from GitHub

get-xasessions.ps1

Displays total, active, and disconnected sessions from a XA 6.x farm

psscriptblitz1c

Get it from GitHub

Happy Friday!
Alain