Configuring Windows Server 2012 Core: SConfig

With the release of Windows 2008, Microsoft introduced the Core installation. This is a stripped down version of the Windows Operating System, without any GUI (less space, smaller attack surface). Microsoft continues this option with Server 2012 and recommends to install the core version. When you install Windows Server 2012, the core installation is even selected by default. Configuring Windows Server 2012 Core is a bit harder without the GUI, so I’m writing two articles about configuring Windows Server 2012 Core.

For the configuration, you have two options: using SConfig or using PowerShell. Microsoft is pushing the use of PowerShell harder and harder, so PowerShell would be the preferred way to configure Windows Server 2012. I will get to PowerShell in the next article, in this article I will focus on using SConfig.

Read More

Monitoring XenApp with WMI – Part 2: Citrix Servers

In part 1 of this series I talked about the basics of the Citrix WMI providers. In this part, I will talk about getting all information about a XenApp server, like which farm it belongs to, what applications are published, etc.

Again, I will be using PowerShell to get the WMI classes. I will assume that you are logged in to the XenApp server to do the WMI calls. But all of these calls can be done from another server (as long as you have the correct permissions and WMI isn’t blocked by a firewall). See part 1 to get more information about remote WMI calls.

Read More

ICAConnect version 1.2

I’ve update my command line tool to connect to XenApp server, ICAConnect. The new version has two new features:

  • Support 32bit color depth
    My fine colleague, Dennis Geerlings, has updated the option to connect to a XenApp server using 32bit colors. To use this, just use the “/color 32bit” switch.
  • Support seamless windows
    I’ve added support for seamless connections. Just use the “/seamless” switch to start an application in seamless mode.

Head over to the Tools section to grab the new version of ICAConnect. If you have any questions or feature requests, feel free to leave a comment or send me an e-mail.

Monitoring XenApp with WMI – Part 1: Basics

It has been a long time ago since I last created a new post. Time for a new one! I’ve created a series of posts about starting ICA connections programmatically (by using PowerShell). These posts were about the client-side of ICA connections; in this series, I will talk about using the Windows Management Instrumation (WMI) which allows you to monitor your XenApp environment.

While Citrix did document something on eDocs, it’s not a highly-documented feature. This feature is actually quite useful when, for example, monitoring your environment.

This post is not about WMI basics, so I expect that you already know what WMI is and how it’s used. I’ll be using PowerShell as an example, but any scripting/programming language can be used to access the WMI classes. To get more information about WMI in general, visit the Microsoft MSDN site.

Read More

ICA connections using PowerShell – Part 4

It has been a while since I last posted something here. And in my previous post in the ICA-PowerShell series, I mentioned doing another post about simulating keyboard and mouse. To sum up, part 1 was about the ICO Object basics, part 2 was about controlling the ICA session appearance and in part 3 I talked about using the ICO Object’s events.

Enabling Simulation API

The ability to control the mouse and keyboard in an ICA session is not enabled by default. For this to work, you will need to enable the Simulation API. This is done by adding a registry key to the machine you will be using:

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Citrix\ICA Client\CCM]
"AllowSimulationAPI"=dword:00000001

The “CCM” subkey doesn’t exist by default, so you should create it. If you’re using a 32bit platform for testing, the registry key should look like this:

[HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\ICA Client\CCM]
"AllowSimulationAPI"=dword:00000001

Read More

Default OU for your SCVMM 2012 Guest OS Profile

In System Center Virtual Machine Manager 2012, you have the option to modify your Guest OS settings when deploying a new virtual machine. The settings you can modify are things like the product key, local administrator password, etc.

One other thing you can define, is that fact that the new virtual machine has to be joined to the domain. Very useful. But what if you also want to define the default Organizational Unit this machine has to be put in? Well, that can also be done using the Guest OS Profile.

Read More

ICA connections using Powershell – Part 3

In part 1 of this series, I talked about the basics. Part 2 was about the overall session appearance. This part will be about using the events which are available in the ICO SDK. The ICO SDK has a lot of events we can use, but we will be talking about a few so that you get a basic idea on how to use them.

Available Events

First of all, let’s start with the code we use to view all events in the ICAClientClass. We already had the following code:

[System.Reflection.Assembly]::LoadFile("C:\Program Files (x86)\Citrix\ICA Client\WfIcaLib.dll")
$ICA = New-Object WFICALib.ICAClientClass
$ICA.Address = "XASRV001"
$ICA.Username = "TestUser01"
$ICA.SetProp("Password","MyUsersPassword")
$ICA.Domain = "LAB"
$ICA.Application = ""
$ICA.Launch = $true
$ICA.OutputMode = [WFICALib.OutputMode]::OutputModeNormal
$ICA.DesiredHRes = 1024
$ICA.DesiredVRes = 768
$ICA.DesiredColor = [WFICALib.ICAColorDepth]::Color16bit
$ICA.Connect()

This will connect an ICA session. To view all event available, we can use the following code:

Read More

ICA connections using Powershell – Part 2

In part 1, I talked about the basics of using the ICA Client Object SDK (ICO SDK). In this second part, I’ll talk about modifying the appearance of your ICA connection using the ICO SDK. This includes:

  • Resolution
  • Color Depth
  • Fullscreen and Seamless Mode

Resolution

The resolution of the ICA connection is modified by setting two properties in your ICO SDK: DesiredHRES (horizontal resolution) and DesiredVRES (vertical resolution). By default the used resolution is 640×480. We already had the following code to make the ICA connection:

[System.Reflection.Assembly]::LoadFile("C:\Program Files (x86)\Citrix\ICA Client\WfIcaLib.dll")
$ICA = New-Object WFICALib.ICAClientClass
$ICA.Address = "XASRV001"
$ICA.Username = "TestUser01"
$ICA.SetProp("Password","MyUsersPassword")
$ICA.Domain = "LAB"
$ICA.Application = ""
$ICA.Launch = $true
$ICA.OutputMode = [WFICALib.OutputMode]::OutputModeNormal
$ICA.Connect()

Read More

ICA connections using Powershell – Part 1

Since version 10.x of the ICA Client, Citrix has shipped the ICA Client Object (ICO) SDK with the installation. This allows developers to control the ICA Client. Writing managed code using ICO is a breeze (my ICAConnect tool is using it), but you can easily write Powershell scripts which leverage the SDK.

The ICOSDK is accessible by using a DLL called “WfIcaLib.dll”, which is located in your ICA Client (or Citrix Receiver) installation directory (default is “%ProgramFiles%\Citrix\ICA Client” on 32bit platforms and “%ProgramFiles(x86)%\Citrix\ICA Client” on 64bit platforms). Now let’s have some fun with the ICO SDK using Powershell.

Read More