Showing posts with label terminal server. Show all posts
Showing posts with label terminal server. Show all posts

Thursday, December 22, 2011

Update teh Active Directory terminal Session Properties

Set objParent = GetObject("ldap://OU=Level/ 02,OU=Security - Administrator Accounts,DC=XenWorld")
objparent.Filter = Array("user")
for each objUser in objParent
 Wscript.Echo "Modifying|" & objUser.Get("CN")
        'SESSIONS ATTRIBUTES
         objUser.MaxDisconnectionTime = 2880 'In Minutes
         objUser.MaxIdleTime = 2880 'In Minutes
         objUser.MaxConnectionTime= 0 'active connections okay
         objUser.BrokenconnectionAction = 0 '0=Disconnect, 1=End
         objUser.SetInfo
next

Details on more properties:
http://www.virtualizationadmin.com/articles-tutorials/terminal-services/scripting/scripting-server-based-computing-terminal-services-attributes-active-directory-user-objects.html

Wednesday, June 29, 2011

Java Red Cross for Users

Users were experiencing a Red Cross for the applet, yet my administrative account was able to load the applet.

Looks like java or the installation process for java is not writing all the registry keys to HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID\{CAFECA-00xx…..


In IE, Java has a catch all applet version – which will always work (aka the latest version)
clsid:8AD9C840-044E-11D1-B3E9-00805F499D93

But most java dude’s call specific versions of java (for example)
clsid:CAFEEFAC-0015-0000-0013-ABCDEFFEDCBA


The server(s) for some reason didn't have all the keys in classes root, where compared to my windows 7 desktop does.

I believe the install for some reason is writing the keys to HKCU instead of HKLM \classes...etc.

So fix is to add all the version to HKEY_LOCAL_MACHINE\SOFTWARE\Classes

http://pastebin.com/YhmwPTq7 contains my fix for 1.6u24 version

btw, Monitoring the registry when tick/untick the “use next generation java” in the java control panel, it just write all the entries to HKCU.

Thursday, June 2, 2011

RDP on Citrix


We have a solution to a couple of issue that has been affecting us when using RDP (MSTSC) via AGEE/Citrx to windows 7 or windows 2008 server.

Issue: Lag Mouse when connecting to Windows 7/2008
Once connected to your RDP desktop:
1. Launch control panel
2. Open ‘Mouse’ control Panel item
3. Select Pointers
4. Change to a theme that doesn’t use AERO
a. For example… (none)

------Regfile----

Windows Registry Editor Version 5.00


[HKEY_CURRENT_USER\Control Panel\Cursors]
"Arrow"=hex(2):00,00
"Help"=hex(2):00,00
"Hand"=hex(2):00,00
"AppStarting"=hex(2):00,00
"Wait"=hex(2):00,00
"NWPen"=hex(2):00,00
"No"=hex(2):00,00
"SizeNS"=hex(2):00,00
"SizeWE"=hex(2):00,00
"SizeNWSE"=hex(2):00,00
"SizeNESW"=hex(2):00,00
"SizeAll"=hex(2):00,00
"UpArrow"=hex(2):00,00
@=""
"Scheme Source"=dword:00000000
"Crosshair"=hex(2):00,00
"IBeam"=hex(2):00,00


[HKEY_USERS\.DEFAULT\Control Panel\Cursors]
"Arrow"=hex(2):00,00
"Help"=hex(2):00,00
"Hand"=hex(2):00,00
"AppStarting"=hex(2):00,00
"Wait"=hex(2):00,00
"NWPen"=hex(2):00,00
"No"=hex(2):00,00
"SizeNS"=hex(2):00,00
"SizeWE"=hex(2):00,00
"SizeNWSE"=hex(2):00,00
"SizeNESW"=hex(2):00,00
"SizeAll"=hex(2):00,00
"UpArrow"=hex(2):00,00
@=""
"Scheme Source"=dword:00000000
"Crosshair"=hex(2):00,00
"IBeam"=hex(2):00,00


Issue: The SHIFT key does not work (sporadic capitals and non-capital letters)– Normally impacts passwords

Change the RDP client settings as follows:
1. Click Options in the Remote Desktop Connection User Interface.
2. Select the Local Resources tab.
3. Under Keyboard > Apply Windows key combinations, select ‘On the local computer’.
After doing this, the SHIFT/ALT/CTRL keys work as expected in the RDP session.
More detail: http://support.citrix.com/article/CTX110281

Tuesday, April 5, 2011

Log Off Terminal Server Session from a Command Prompt on based username

This script base command to clear user off a server based on username, for this to work we need to determine the session id that is required by the logoff command.

How it works :
Use the 'For' loop to search work thru the list of users on the server
Then once it has found the user then execute a logoff command

Notes:
There are 2 cases as the qwinsta doesn't display the formating the same for
disconnected sessions & active sesssions.



REM @echo off
Set servername=citrix123
Set targetname=testuser1

REM For disconnected users
for /F "tokens=1,2,3" %%i in ('qwinsta %targetname% /Server:%servername%') do if %targetname%==%%j logoff %%k /server:%servername%
REM For active users
for /F "tokens=1,2,3" %%i in ('qwinsta %targetname% /Server:%servername%') do if %targetname%==%%i logoff %%j /server:%servername%

Tuesday, March 22, 2011

Terminal Server Bug - windows 2003 - slow disk

Lol. just fun a sorting out a OS bug with Microsoft Support team.

Terminal server 2003 when there are lot of users logging on/off and you have group policy preferences enabled can cause large amount of folders\files to be written to the group policy\ history folder in the all users directory. All this added up to some rather slow disks

Winlogon.exe was polling all these files every 40 seconds or so, this cause the idle disk time to drop to 0% and queue length to shoot up. Once of the test were dir /s every few moment it would pause.

Detected with procmon, set on files only and all other filters removed. Then used the file summary to locate what is causing the large amount of queuing.

Solution: weekly deletes of ...users\all users\application data\microsoft\group policy\history\* sub folders