Friday, February 11, 2011

Windows 2003 Server out of the network due to IPSEC error ID : 4292

Error Screenshot :



Solution:  To resolve this issue, follow these steps:
  1. Delete the local policy registry subkey. To do this, follow these steps:
    1. Click Start, click Run, type regedit in the Open box, and then click OK.
    2. In Registry Editor, locate and then click the following subkey:
      HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\IPSec\Policy\Local
    3. On the Edit menu, click Delete.
    4. Click Yes to confirm that you want to delete the subkey.
    5. Quit Registry Editor
  2. Rebuild a new local policy store. To do this, Click Start, click Run, type regsvr32 polstore.dll in the Open box, and then click OK.
  3. Verify that the IPSEC Services component is set to automatic, and then restart the domain controller.

Thursday, February 10, 2011

Set Citrix services recovery options to "Restart the Service"

We can set Citrix importent Services Recovery Option to "Restart the services" by a batch script.

Please save the below codes to a notepad and name it anything.bat

"@echo off
echo Citrix Active Sync
reg add hklm\system\currentcontrolset\services\CtxActiveSync /v failureactions /t REG_BINARY /f /d 00000000000000000000000003000000530065000100000060EA00000100000060EA00000100000060EA0000

echo Client-network
reg add hklm\system\currentcontrolset\services\CdmService /v failureactions /t REG_BINARY /f /d 00000000000000000000000003000000530065000100000060EA00000100000060EA00000100000060EA0000

echo client-dg
reg add hklm\system\currentcontrolset\services\CdfSvc /v failureactions /t REG_BINARY /f /d 00000000000000000000000003000000200043000100000060EA00000100000060EA00000100000060EA0000

echo Client Encryption Service
reg add "HKEY_LOCAL_MACHINE\system\currentcontrolset\services\Citrix Encryption Service" /v failureactions /t REG_BINARY /f /d 00000000000000000000000003000000200043000100000060EA00000100000060EA00000100000060EA0000

echo citrix health mon
reg add hklm\system\currentcontrolset\services\CitrixHealthMon /v failureactions /t REG_BINARY /f /d 00000000000000000000000003000000530065000100000060EA00000100000060EA00000100000060EA0000

echo citrix imaservice`
reg add hklm\system\currentcontrolset\services\imaservice /v failureactions /t REG_BINARY /f /d 00000000000000000000000003000000200043000100000060EA00000100000060EA00000100000060EA0000

echo Citrix MFCOM
reg add hklm\system\currentcontrolset\services\MFCom /v failureactions /t REG_BINARY /f /d 00000000000000000000000003000000530065000100000060EA00000200000060EA00000100000060EA0000

echo print
reg add hklm\system\currentcontrolset\services\cpsvc /v failureactions /t REG_BINARY /f /d 00000000000000000000000003000000630074000100000060EA00000100000060EA00000100000060EA0000

echo IMAAdvanceSrv
reg add hklm\system\currentcontrolset\services\IMAAdvanceSrv /v failureactions /t REG_BINARY /f /d 00000000000000000000000003000000530065000100000060EA00000200000060EA00000100000060EA0000

echo SMA
reg add "HKEY_LOCAL_MACHINE\system\currentcontrolset\services\Citrix SMA Service" /v failureactions /t REG_BINARY /f /d 00000000000000000000000003000000530065000100000060EA00000100000060EA00000100000060EA0000

echo xml
reg add hklm\system\currentcontrolset\services\ctxhttp /v failureactions /t REG_BINARY /f /d 00000000000000000000000003000000530065000100000060EA00000100000060EA00000100000060EA0000

"

Few Importent PowerShell Syntex for Xenapp.

Publish a new application in your environment.

New-XAApplication -BrowserName “TEST” -ApplicationType “ServerInstalled” -DisplayName “TEST” -FolderPath “Applications/Testing” -CommandLineExecutable “c:\windows\system32\notepad.exe” -WorkingDirectory “c:\Windows\system32”-ClientFolder "Testing\Server Testing" -AddToClientStartMenu $false -WaitOnPrinterCreation $false -Description “TEST” -Accounts “Domain_Name\user name or group name” -ServerNames “your server_name”

Assign a Load Evaluator on a server

Set-XAServerLoadEvaluator "server_name" "LE name"

Sunday, February 6, 2011

Usage statistics for Published Applications in Citrix XenApp 4.5

Description
A customer asked me to provide a summary report of the published application usage that needed to containing following elements.
-Published application.
-On which server was the application started.
-When did the user start the session
-When did the user end the session.
-Username of the users accessing the published application.

PrerequisitesA configured summary SQL database for you citrix farm.

SolutionAt first I thought this could easily be accomplished by creating a Billing report in resource management, but this was not the case as there was no way to link a report to published applications.

The solution I ended up using was writing a query to extract this information from the Summary Database.
The first thing I did was look for the database diagram, it ended up to be quite well document in the citrix guide Monitoring_Server_Performance.pdf on page 96 there was complete diagram of the database.
This made writing the query not that difficult.
You can open following query in the Microsoft SQL Server Management Studio, select the summary database. You can change the date as needed to select from which time you want the events in our example we want all the events after the 1st of August.

SELECT LU_APPNAME.APPNAME,LU_SERVERNAME.SERVERNAME, SDB_SESSION.SESSIONSTART, SDB_SESSION.SESSIONEND, LU_USER.USERNAME
FROM
LU_APPNAME, SDB_SESSION, LU_USER, LU_SERVERNAME, LU_SERVER
WHERE
LU_APPNAME.PK_APPNAMEID = SDB_SESSION.FK_APPNAMEID
AND LU_USER.PK_USERID = SDB_SESSION.FK_USERID
AND SDB_SESSION.FK_SERVERID = LU_SERVER.PK_SERVERID
AND LU_SERVERNAME.PK_SERVERNAMEID = LU_SERVER.FK_SERVERNAMEID
AND SDB_SESSION.SESSIONSTART > '2009-08-01 00:00:00.000'
ORDER BY LU_APPNAME.APPNAME

I also included another script to monitor the number of sessions started per user for a period of time.

select LU_USER.username, count(*) sessions
from SDB_SESSION, LU_USER
where LU_USER.PK_USERID = SDB_SESSION.FK_USERID
AND SDB_SESSION.SESSIONSTART > '2009-08-01 00:00:00.000'
GROUP BY LU_USER.username


The result of this query can be copied to excell or you can use this query to create a report.