Tuesday, March 18, 2014

The Missing RDL, Unique Users in Edgesight 5.4

I went looking for one of my old standby EdgeSight reports and it was gone.  I went and found it on an older installation.  So if you are looking for a Xenapp unique user count via edgesight, here it is...

Unique User Logon Counts

Monday, March 17, 2014

VMware Tools Beat Down My PVS-ed Servers

Citrix PVS is a magical technology that allows the OS to be streamed to you servers/desktops but it has a weak spot.  In PVS the network equals the disk.  My VMware goon was performing patching on my ESXi host and one of the patches included updated VMware tools.  VMware is configured to automatically update tools by default when the VMs start back up.  I ended up with servers full of VMs that would boot up and work for a minute or so and then lock up hard.  In troubleshooting, I discovered the tools CD was mounted on every box.  Two ways to avoid this.

Disable updating the tools in the VMware Update Manager

Tag the VMs with "No Update" via PowerCli

Foreach ($v in ( Get-Cluster "<CLUSTER NAME>" | get-vm)) {
$vm = $v | Get-View
$vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec
$vmConfigSpec.Tools = New-Object VMware.Vim.ToolsConfigInfo
$vmConfigSpec.Tools.ToolsUpgradePolicy = "manual"
$vm.ReconfigVM($vmConfigSpec)

}

Good night and good luck...

Tuesday, March 4, 2014

OU to Environment Variable Script

So you want to know what OU your server is in to take some kind of action.  I like to load this data into an envrionment varibale so I can have it handy.  Here is my powershell solution:

$DS = New-Object System.DirectoryServices.DirectorySearcher
 $DS.Filter =  "(&(objectCategory=Computer)(Name=$env:computername))"
 $DN = ($DS.FindOne()).GetDirectoryEntry().DistinguishedName
 $ou=$DN[0].substring($DN[0].indexof(",OU=")+4)
 if ($ou.indexof(",OU="))  {$ou=$ou.substring(0,$ou.indexof(",OU="))}
 else  {$ou=$ou.substring(0,$ou.indexof(",DC="))}
[Environment]::SetEnvironmentVariable("OU",$OU,"Machine")

Enjoy.