Apr 11

Author : Ingmar Verheij

System Center Operations Manager (SCOM) agents are by default allowed to only return data from the same source. If the agent needs to submit data from another source, for instance in a cluster, the security feature ‘Agent Proxy’ needs to be enabled. By default this feature is disabled.

If you create (or import) a management pack that relies on this feature, for example when the management pack submits data from another source, you might want automate this.

Continue reading »

Mar 15

When Launching a PowerShell script I noticed the following error: “AuthorizationManager check failed.

AuthorizationManager check failed.| At line:1 char:2 | Microsoft.PowerShell_profile.ps1'

This happens because either the Current User or the All Users PowerShell profile is empty.

Continue reading »

Mar 09

Author : Ingmar Verheij

If you want to use the Delivery Services Console (the management console of Citrix XenApp 6.x) from a remote machine, you need to enable remote access in DCOM (as described in CTX131829).

You can automate this via PowerShell using the script found below.

Continue reading »

Mar 08

Author : Ingmar Verheij

If you wanted to change the product edition (Advanced / Enterprise / Platinum) of a Citrix XenApp (4, 5 of 6.0) server this was done per server. How you can change the product edition is explained in this article on Citrix Blogs. In Citrix XenApp 6.0 this was done either via the console of via a PowerShell cmdlet called Set-XAServerEdition.  Since the product edition in XenApp 6.5 is no longer set  per server (but via a Policy) this cmdlet is removed.

Continue reading »

Mar 06

I am writing a script that is going to automate a number of manual steps involved in creating a new image with Citrix PVS.

First step is to copy the most recent base image which is kept in a folder structure. The folder name is always YYYY-MM-DD (description):

image

I needed to determine the most recent folder and didn’t want to rely on creation date. Instead I walk the directory tree and filter the date out of the filename with a regular expression:

Continue reading »

Feb 14

Author : Ingmar Verheij

Recently I wrote a PowerShell script that connects to the console of a virtual machine on a Citrix XenServer, without using XenCenter or the Web Self Service portal. This allowed me to offer a published application to my users so they can connect to the console session. But what if they want to connect via a Remote Desktop Connection (RDP)?

I’ve written a PowerShell script that looks up the IP address of the VM and connects via RDP.

Continue reading »

Feb 14

Just some quick code to get the OU Name of the computer we run the script on.

VBS:

Function GetComputerOU
  Dim objSysInfo: Set objSysInfo = CreateObject("ADSystemInfo")
  Dim objComputer: Set objComputer = GetObject("LDAP://" & objSysInfo.ComputerName)
  Dim objOU : Set objOU = GetObject(objComputer.Parent)
  GetComputerOU = objOU.OU
End Function

Wscript.Echo GetComputerOU

PowerShell:

function GetComputerOU
{
  $SysInfo = New-Object -ComObject "ADSystemInfo"
  $Computer = [ADSI]("LDAP://{0}" -f $SysInfo.GetType().InvokeMember("ComputerName", [System.Reflection.BindingFlags]::GetProperty, $null, $SysInfo, $null))
  return ([ADSI]$Computer.Parent).OU

GetComputerOU

Feb 13

The Citrix Online Plugin has a number of settings that can be changed. This includes things as Window Size and Color Depth:

Session Options | Window size | Default | Full Screen | Requested Color Quality

In my case I wanted to preset the Window size to Full Screen so using Process Monitor I checked where the Online Plugin writes this setting. I Used a Filter that includes only the Online Plugin (PNAMain.exe) and the RegSetValue Operation:

Filter on Process Name is PNAMain.exe | Operation is RegSetValue

Continue reading »

Feb 02

Author: Ingmar Verheij

If you want to connect to the console of a virtual machine running on Citrix XenServer you either need XenCenter or the Web Self Service portal.

I created a PowerShell script that connects to the console of the virtual machine, without the use of both. This script can be used to offer a shortcut to a virtual machine without requiring the user to have XenCenter installed, or having a XenServer Enterprise or Platinum license (it works with the free license).

Continue reading »

Dec 02

I was creating a small dialog in an .hta file and to make a little prettier for the user I included a company logo:

SNAGHTMLdfa805

But I wanted to deploy the .hta as a single file.

Continue reading »