Default Domain for Windows Server


Usually when you remotely connect to a Server Desktop either via RDP or Citrix, the default Domain should be your domain, sometimes the server name appears instead. To change the server to display the domain as default you can either log onto the server’s console (or mstsc /console or mstsc/admin) with your domain account, then log off or you can make the following registry change on the server

HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultDomainName

Default Domain for Windows Server

Most Commonly Published Applications


Active Directory Users and Computers:

Command Line: mmc.exe “C:\Windows\system32\dsa.msc”
Working Directory: C:\Windows\system32

ADUC for a different domain:

Command Line: runas /netonly /user:gcexternal\%username% “mmc dsa.msc /server=SERVERipADDRESS”
Working Directory: C:\Windows\system32

Shadow Taskbar

Command Line: “c:\program files (x86)\citrix\System32\wshadow.exe”
Working Directory: c:\program files (x86)\citrix\System32\

Remote Desktop

Command Line: “C:\Windows\system32\mstsc.exe”
Working Directory: C:\Windows\system32\

Most Commonly Published Applications

Extending disk space C: drive on a Windows 2003 Server


Sometimes when you run out of space on a server, you want to add more disk space.

You will need to add another drive or expand the disk (virtually) where you will have free unallocated disk space.

On the windows server, there is a utility called diskpart, instructions on how to use is is below
http://support.microsoft.com/kb/325590

In some circumstances you will get an error ““The volume you have selected may not be extended”

Another tool that I’ve found that can overcome this error is http://ftp.dell.com/app/ExtPart.exe

it works on Dell servers as well as Virtualised servers.

Another site with good instructions using a different method can be found at:

http://www.ivobeerens.nl/?p=32

Extending disk space C: drive on a Windows 2003 Server

How to determine the type and where the Citrix datastore is located


Investigate the properties of C:\Program Files\Citrix\Independent Management Architecture\MF20.dsn.

The following is an example of an MF20.dsn file from a server using an Access data store on the local machine:

For a MS Access database datastore:

[ODBC]

DRIVER=Microsoft Access Driver (*.mdb)
PageTimeout=5
MaxBufferSize=2048
FIL=MS Access
DriverId=25
DBQ=C:\Program Files\Citrix\Independent Management Architecture\MF20.mdb

For a SQL database datastore:

[ODBC]

DRIVER=SQL Server
UID=useraccount
Address=MySqlServer,1433
Network=DBMSSOCN
DATABASE=myfarmdb
WSID=MyMfServer
APP=Citrix IMA
SERVER=MySqlServer

If the MF20.dsn file is not present, it means the server is doing an indirect connection to the data store. Check the value of server with the direct connection to the registry under:

HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\IMA\PSServer

Check the MF20.dsn on that server.

For Access data stores, only one server in the farm (the one hosting the data store) shows imaacces.dll under: HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\IMA

How to determine the type and where the Citrix datastore is located

Published App Icon not updating in WI and PNA, after app was updated with new Icon


I ran into this strange problem where a new published app was created, publishing a webpage.  The default IE icon was given to the published app.

I then proceeded to update the app with a new icon, this new icon was registered in the Citrix Management Console as expected, but when I went to the PNA or the WI, the IE icon was still there for the app.

The cause of this problem is something to do with icon caching. There are apparently some registry hacks, and some icon cache folders to be delete. This is a bit hit and miss. They method that works is to actually delete the old Citrix app, recreate it, and select the new icon before finalising the app’s creation.

Published App Icon not updating in WI and PNA, after app was updated with new Icon

Problems launching a web browser based app? getting error related to speedscreenapi.dll


Problem: You try to launch IE or OWA as a Citrix published application, and it does not launch. The Event logs report a problem with the speedscreenapi.dll file.

This seems to be a problem with IE6 browser.

Solution: Delete the following registry key from the effected server

HKLM\Software\Citrix\CtxHook\AppInit_DLLS\speedscreen\iexplore.exe

Problems launching a web browser based app? getting error related to speedscreenapi.dll

Common Citrix Commands to help you with your job… or interviews.


  • chfarm – used to join the Citrix server to another farm
  • ctxxmls – to change the xml service port number
  • dsmaint – configure Citrix IMA datastore
  • query user – retrieves current user connections
  • qfarm /load – displays load on server
  • qfarm /app – display published applications currently being run
  • qfarm /online – displays online servers
  • qfarm /offline – displays server that are offline or hung, IMA service not running.
Common Citrix Commands to help you with your job… or interviews.

Fixing DCOM Error’s in events log


Problem: Sometimes on a server, you will get a lot of these DCOM errors. This is a permissions issue.

Solution: Note the CLSID, in this example, the CLSID is {49BD2028-1523-11D1-AD79-00C04FD8FDFF}.

  • Open Component Services, go to Computers -> My Computers -> DCOM Config
  • Ensure the right side is viewed in detail mode
  • Scroll down to locate the Application ID matching the CLSID noted above.
  • Right-click on he Application and select properties.
  • Go to the Security Tab, ad in the Lauch and Activation Permissions, select Edit
  • You will notice a few accounts with SIDS
  • Delete these rouge SID’s and add the account that should have access to the application, in this case, it is Ctx_SmaUser, and allow all options.
  • Now refresh the event log and you will notice the error is no longer recorded.
Fixing DCOM Error’s in events log

Dump a list of all AD groups in a Domain, and their users


Copy the script between the red line.

=============================================================

‘VBScript to output to text file the members of all groups

On Error Resume Next

Set objArgs=wscript.Arguments

If objArgs(0)<>”-dn” Then

wscript.echo “Dumping group membership using full DN…”

Else

wscript.echo “Dumping group membership using only first CN part…”

End If

‘Stuff for creating output text file

Const OutputFile = “.\groupdump.txt”

Set Fso = CreateObject(“Scripting.FileSystemObject”)

Set Wshshell = Wscript.CreateObject(“Wscript.Shell”)

Set Output = Fso.OpentextFile(OutputFile, 2, True)

Set ADSIRootDSE = GetObject(“LDAP://RootDSE”)

ADSINamingNC = ADSIRootDSE.Get(“rootDomainNamingContext”)

Set ADSIConnection = CreateObject(“ADODB.Connection”)

ADSIConnection.Provider = “ADsDSOObject”

ADSIConnection.Open “ADs Provider”

ADSIQueryText = “<LDAP://” & ADSINamingNC & “>;(&(objectCategory=group));name,distinguishedName;subtree”

Set ADSICommand = CreateObject(“ADODB.Command”)

Set ADSICommand.ActiveConnection = ADSIConnection

ADSICommand.CommandText = ADSIQueryText

ADSICommand.Properties(“Page Size”) = 100

ADSICommand.Properties(“Timeout”) = 60

ADSICommand.Properties(“searchscope”) = 2

ADSICommand.Properties(“Cache Results”) = False

Set ADSIResult = ADSICommand.Execute

Do While not ADSIResult.EOF

Output.WriteLine

Output.WriteLine

Output.WriteLine “Group: ” & ADSIResult.Fields(“name”).Value

Output.WriteLine “===============================================================”

Set GetDN = GetObject(“LDAP://” & ADSIResult.Fields(“distinguishedName”).Value)

strAllValues = GetDN.GetEx(“member”)

iGroupCount = 0

For each strValue in strAllValues

If Len(strValue) = 0 Then

Output.WriteLine “There are no members in this group.”

Else

iGroupCount = iGroupCount + 1

If objArgs(0)<>”-dn” Then

Output.WriteLine strValue

Else

Call Stripper(strValue)

Output.WriteLine tmp

End If

End If

Next

Output.WriteLine “Total members in group: ” & iGroupCount

Set strAllValues = Nothing

ADSIResult.MoveNext

Loop

Output.Close

wscript.echo “Operation has finished.”

Wscript.quit

Function Stripper(StripperString)

pos = InStr(1, StripperString, “cn=”, vbTextCompare)

If pos <> 0 Then

tmp = Mid(StripperString, pos + 3)

pos = InStr(tmp, “,”)

If pos <> 0 Then tmp = Mid(tmp, 1, pos – 1)

End If

End Function

=============================================================

Dump a list of all AD groups in a Domain, and their users