How to Rebuild WMI service

net stop winmgmt
cd %systemroot%\system32\wbem
rd /S /Q repository

regsvr32 /s %systemroot%\system32\scecli.dll
regsvr32 /s %systemroot%\system32\userenv.dll

mofcomp cimwin32.mof
mofcomp cimwin32.mfl
mofcomp rsop.mof
mofcomp rsop.mfl
for /f %s in (‘dir /b /s *.dll’) do regsvr32 /s %s
for /f %s in (‘dir /b *.mof’) do mofcomp %s
for /f %s in (‘dir /b *.mfl’) do mofcomp %s

Recompile Citrix .MOF files:
cd %programfiles%\citrix\system32\citrix\wmi
for /f %s in (‘dir /b *.mof *.mfl’) do mofcomp %s
net start winmgmt

Posted in Citrix XenApp | Leave a comment

Deploying Citrix server from from VM Template

1. From VSphere client clone existing production Citrix server.
2. Remove the network adapter and power on the VM.
3. Run the SysPrep by selecting Generalize
4. Update the hostname and join to a WORKGORUP
5. Disable the Citrix IMA and Citrix MFCOM services.
6. Reboot the server.
7. Apply a new IP address.
8. Connect the production network adapter.
9. Join to the domain.
10. Move the server to the corresponding OU in Active Directory.
11. Update the registry keys: HLKM\Software\WOW6432Node\Citrix\IMA\Runtime\Hostname = {Citrix Server Name}
12. Uninstall and Install Antivirus software.
13. Recreate the Local Host Cache (dsmaint recreatelhc).
14. Reboot the server.
15. Change the Citrix IMA and Citrix MFCOM services from Disabled to Automatic. Start both services.
16. From Citrix AppCenter console check if the new server is available.
17. If Citrix System Monitoring Agent is installed, stop Citrix System Monitoring Agent service.
18. Rename RSDATR.FDB file to RSDATR.FDB_old located in “C:\Programdata\Citrix\System Monitoring\Data”.
19. Start Citrix System Monitoring Agent service.
20. Move the Citrix XenApp Servers to correct folder location in Citrix AppCenter console.

Posted in Citrix XenApp | Leave a comment

Loopback Options When Load Balancing StoreFront Server Group Using NetScaler

NSIn previous versions of StoreFront servers (2.6 or older), Citrix recommended to manually modify the hosts file on each StoreFront server to map FQDN of the load balancer to the IP address of the specific StoreFront server or the loopback address.

This is necessary because an HTTP session is created during the explicit login process between Receiver for Web and the authentication service and Receiver for Web communicates with StoreFront services using the base FQDN. If the base FQDN were to resolve to the load balancer, the load balancer could potentially send the traffic to a different StoreFront server in the group, leading to authentication failure.

By doing this Receiver for Web always communicates with the StoreFront services on the same server in a load balanced StoreFront deployment.

You can set loopback options using PowerShell. Enabling loopback negates the need to create host file entries on every StoreFront server in the server group.

Example – Receiver for Web web.config file:
<communication attempts=”2″ timeout=”00:01:00″ loopback=”On” loopbackPortUsingHttp=”80″>

Example – PowerShell command:
& “c:\program files\Citrix\receiver storefront\scripts\ImportModules.ps1”
Set-DSLoopback -SiteId 1 -VirtualPath “/Citrix/StoreWeb” -Loopback “OnUsingHttp” -LoopbackPortUsingHttp81

From StoreFront 3.0, we can enable loopback in the StoreFront Console.

Posted in Citrix XenApp | Leave a comment

What is New in Citrix StoreFront 3.0

Classic Receiver Experience

To help you smooth the transition, StoreFront 3.0 supports the classic Receiver experience and when we upgrade from StoreFront 2.x to 3.0, the UI for the existing Receiver for Web sites will remain as the classic green bubble UI. When you create new Receiver for Web sites after the upgrade, users will see the new unified UI.
We can enable the new unified UI by selecting the Disable Classic Receiver Experience and Set Unified Experience as Default in Receiver for Web site.

Google Chrome Support without NPAPI

Google Chrome on Windows and Mac is fully supported without Netscape Plugin Application Programming Interface (NPAPI) in StoreFront 3.0. Receiver for Windows 4.3 and Receiver for Mac 12.0 support this features.

No Need of Editing Hosts File

Previously, as stated here, Citrix recommends that you modify the hosts file on your StoreFront servers to ensure that Receiver for Web always talks to the local StoreFront server instead of the load balancer. In StoreFront 3.0, we leverage a new feature in the .NET Framework 4.5 to implement loopback communication between Receiver for Web and the rest of StoreFront Services. This is configurable using PowerShell cmdlet

Set-DSLoopback [-SiteId] &lt;Int64&gt; [-VirtualPath] &lt;String&gt; [-Loopback] &lt;String&gt; [[-LoopbackPortUsingHttp] &lt;Int32&gt;]

Set-DSLoopback -SiteId 1 -VirtualPath /Citrix/StoreWeb -Loopback OnUsingHttp -LoopbackPortUsingHttp 81

Delegating Authentication to the Backend Providers

StoreFront 2.x communicates with the Active Directory to authenticate users. So the domain hosting StoreFront servers should have one-way external trust to the domain hosting the backend XenApp farms/sites. This may not be possible in some deployments. StoreFront 3.0 has the capability to delegate authentication to the XenApp farms.

Treating All Desktops as Applications

In earlier StoreFront, Desktops and applications are treated differently and are placed in a separate tabs in Receiver for Web. To keep published Desktop in the same tab with published applications, we have to add the TreatAsApp keyword to the published desktops. StoreFront 3.0 enables you to configure treating all desktops as applications at the store level without the need of adding the TreatAsApp keyword to all the published desktops

Integrated Monitoring Service for NetScaler

Before StoreFront 3.0, we have to install add-on package on the StoreFront server to support NetScaler monitoring. Now from StoreFront 3.0 it is integrated in StoreFront 3.0. It is installed and enabled by default. You can use PowerShell commands to modify the settings of this service or disable this service.

To check the URL for this service, use the cmdlet:

Set-DSServiceMonitorFeature -ServiceUrl https://localhost:444/StorefrontMonitor

Posted in Citrix XenApp | Leave a comment

How to recover/reset password for a NetScaler appliance

We should avoid HA failover due to reboot, so it is recommended to set STAY PRIMARY on primary node and STAY SECONDARY on secondary node.

To reset the nsroot password, you must boot the appliance into single user mode.

Connect the console cable to the Netscaler Serial Console (9600 baud, 8 bits, 1 stop bit, No parity) of the NetScaler appliance. In case of NetScaler VPX access NetScaler through vSphere console.

1. After connecting to the Netscaler Serial Console, restart the NetScaler appliance.

2. Press Ctrl+C keys simultaneously to Boot in kernel.

3. To start the appliance kernel on a single user mode, run boot -s. If boot -s does not work, then try reboot — -s.

4. Press ENTER key to display the # prompt, and run the following command to verify the /flash drive consistency:
$ /sbin/fsck /dev/ad0s1a

5. Run the following command to display the mounted partitions:
$ df

6. Check if /flash drive is created, then run the following command to mount the flash drive:
$ /sbin/mount /dev/ad0s1a /flash

If the preceding command fails to mount the flash drive, then run the following command to create the flash directory and then run the preceding command again to mount the drive:
$ mkdir /flash

In case of NetScaler VPX on VMware, the disk uses SCSI emulation and the device name of the flash drive is da0s1a.

7. Run the following command to change to the nsconfig directory:
$ cd /flash/nsconfig

8. Create a new configuration file that does not have commands defaulting to the nsroot user:
$ grep –v “set system user nsroot” ns.conf > new.conf

9. Make a backup of the existing configuration file:
$ mv ns.conf old.ns.conf

10. Rename the “new.conf” file to “ns.conf”:
$ mv new.conf ns.conf

11. Run the following command to restart the appliance:
$ reboot

12. Log on to the appliance using the default nsroot user credentials (nsroot/nsroot).

13. Reset the nsroot user password of your choice:
$ set system user nsroot <New_Password>

Posted in Citrix XenApp | Leave a comment