Appendix B. MetaFrame Presentation Server Command Reference

Command Summary List

This appendix is a reference of the MetaFrame Presentation Server–specific commands available when installed on a Windows 2003/2000 Terminal Server. For most commands, the /? parameter displays the command’s usage. In my examples, I assume that you have remapped the server drives starting at X:. If you used a different mapping or have not remapped the drives at all, simply substitute the X: drive for the desired drive letter and the examples will still work correctly.

Terminal Server–specific commands are not listed in this appendix. Please see Appendix A, “Terminal Services Command Reference,” for a complete list of the basic commands provided with a Windows 2003 or 2000 Terminal Server installation. Table B.1 summarizes the available MetaFrame Presentation Server commands referenced in this appendix.

Table B.1. MetaFrame Presentation Server Commands

Command

Description

AcrCfg

Lets you configure the auto client reconnect settings.

AltAddr

Manages alternate IP addresses.

App

Simple, serial execution scripting tool.

AuditLog

Generates reports based on the contents of the security event log.

Change Client

Manages client device mappings.

ChFarm

Changes a server’s farm membership.

ChgCdm

Same command as Change Client.

CltPrint

Adjusts the number of printer pipes for the client print spooler.

Ctxxmlss

Changes the listening port for the Citrix XML Service.

DSCheck

Performs an integrity check against the data store.

DSMaint Recover

Restores an Access data store from the system backup.

DSMaint Backup

Backs up an Access data store to a specified location.

DSMaint CompactDB

Compacts an Access data store.

DSMaint Compare

Compares the source data store with the migrated data store.

DSMaint Config

Modifies the data store connection parameters for the IMA service.

DSMaint FailOver

Changes the direct server pointed to by an indirect MetaFrame server.

DSMaint Migrate

Migrates a data store from one database to another.

DSMaint PublishSQLDS

Publishes SQL Server articles as part of SQL Server replication.

DSMaint RecreateLHC

Rebuilds the local host cache.

DSMaint VerifyLHC

Verifies the integrity of the local host cache.

ICAPort

Modifies the listening port for TCP/IP ICA connections.

IMAPort

Modifies the communication port for the IMA service, the management console, and the data store server port when running in indirect mode only.

Query Farm

Retrieves information about MetaFrame servers within an IMA server farm.

Query Server

Retrieves information from MetaFrame 1.x servers or XP servers in interoperability mode.

TWConfig

Configures the ICA display settings.

ACRCFG

This command lets you configure the auto client reconnect settings for an individual server or the farm-wide defaults.

Usage:

acrcfg [/query] {[/server:servername] | [/farm]}
acrcfg {[/server:servername] | [/farm]} [/inherit:on|off]
[/require:on|off] [/logging:on|off]

Option

Function

/query

Displays the current settings.

/server:servername

Specifies an alternate MetaFrame server to view or update. The default is the local server.

/farm

Specifies the farm to view or update.

/inherit:on|off

Turns on or off farm inheritance for this setting.

/require:on|off

Turns the requirement for user authentication on or off.

/logging:on|off

Turns logging on or off for client reconnections.

Examples:

X:>acrcfg /query
Auto Client Reconnect Info for: Local Server

    INHERIT:     on
    REQUIRE:     off
    LOGGING:     off

X:>acrcfg /query /farm
Auto Client Reconnect Info for: Farm-wide Settings

    REQUIRE:     off
    LOGGING:     off

ALTADDR

The ALTADDR command is used to manage the alternate IP address on a MetaFrame server. When requested, this alternate address is returned to an ICA client that is typically located on the external side of a firewall performing network address translation (NAT). Figure B.1 shows a simple example of this.

A simple example of where ALTADDR could be used to provide connectivity.

Figure B.1. A simple example of where ALTADDR could be used to provide connectivity.

As you can see, the MetaFrame server is located on the internal network and has address 192.168.100.1. The firewall is performing NAT from the external interface of 100.100.100.1 through to the MetaFrame server. When launching a published application (through Program Neighborhood, Program Neighborhood Agent, or Web Interface for MetaFrame, for example), normally the “true” IP address of the MetaFrame server is returned to the client, but in this case 192.168.100.1 would be of no use to an external client, since there is no valid route to that address.

Instead, the client actually wants to receive the external address (the one that will be translated). This is where the ALTADDR command comes in. ALTADDR lets you define the external address of the MetaFrame server that can then be returned to an ICA client if requested. The client must be configured to request the alternate address in order to receive it. Figure B.2 shows an example of where this would be set on a Win32 client. See Chapter 14, “MetaFrame Presentation Server Configuration,” for a complete discussion on accessing a MetaFrame server through a firewall.

Configuring use of an alternate address in the firewall settings of a Win32 client.

Figure B.2. Configuring use of an alternate address in the firewall settings of a Win32 client.

TIP:

If external clients are connecting directly to a MetaFrame server through the external address, the ALTADDR setting does not need to be configured. It must be set up only if you will be connecting to published applications (directly, via Program Neighborhood or Web Interface for MetaFrame Presentation Server) and the MetaFrame servers in the farm are behind a firewall from the connecting clients.

Usage:

altaddr [/v] [/server:name] [/set <AlternateAddress>]
altaddr [/v] [/server:name] [/delete [AdapterAddress]]
altaddr [/v] [/server:name] [/set <AdapterAddress>
<AlternateAddress>]

Option

Function

/v

For verbose display mode.

/server:name

Applies the configuration to the server specified by name instead of the current server.

/set

Sets the alternate TCP/IP address specified.

/delete

Deletes only the default alternate addresses on the server unless a specific adapter address (IP address) is given.

AdapterAddress

Assigns the alternate address to the adapter specified by this IP address.

AlternateAddress

The alternate IP address to set or delete.

Examples:

This sets the alternate address on the server on which it is being run. In this example, our server’s “real” IP address is 192.168.100.1 (see Figure B.1).

X:>altaddr /v /set 100.100.100.1
Server Name: neki   Transport Name: TCP
Adapter entry DefaultAddress is being set to the alternate address
100.100.100.1

X:>altaddr
Alternate TCP addresses for neki

Local Address          Alternate Address
______________         _________________
Default                100.100.100.1

TIP:

You must configure an alternate address for every server that will be accessed from across the firewall. If you have servers in your farm that will not be accessed externally, you will not be required to configure an alternate address.

APP

APP is a simple scripting tool you can use to fine-tune an application’s behavior. It’s often used to improve application security by letting you perform specific actions before and after execution of an application. APP differs from simply using a .CMD batch file because it ensures that the listed commands are processed sequentially and execution cannot be terminated by the user. If an application is started from within APP, the script waits until the application terminates before continuing. This can be very useful, particularly if you must perform an action only once the application has finished executing.

Any script files you create for APP must be located in the %SystemRoot%Scripts folder. You may need to create this folder, as it does not exist by default. Because APP always looks in the same location for the script file, you can simply use the script file name regardless of where APP is actually called. For example:

            X:>app RunApp.txt

where RunApp.txt is the script file.

TIP:

The APP scripting tool provides only limited functionality. Very often I use APP to control calling other scripts written using languages such as VBScript, which provide more robust functionality with such features as registry updates. After the application terminates, I can then use APP to call other scripts to perform additional cleanup.

Usage:

app <scriptfile>

Option

Function

Scriptfile

The name of the script file containing the APP commands. The commands are listed next. If scriptfile is omitted, APP terminates with an error. The script file must reside in %systemroot%Scripts.

APP Command

Description

copy <source> <target>

Copies files from source to target. Wildcards (* or ?) are supported.

delete <file>

Deletes the specified file.

Deleteall <directory><file>

Deletes all files in the specified directory. A file name or wildcard must be included; otherwise, nothing gets deleted.

path <file>

Sets <file> to be executed by the execute command.

Workdir <directory>

Sets the working directory for the execute command.

Execute

Executes the file specified by the path command. The working directory is set with the workdir command.

Examples:

Begin by creating the folder %SystemRoot%Scripts. Then create a command script called LISTIT.cmd that contains the following line:

Dir * /s > x:	empoutput.txt

You may need to create the X:TEMP directory in order for this example to work properly. Next create an APP script in the same folder called RUNIT.TXT, which contains the following:

Path x:windowsscriptslistit.cmd
Workdir x:
Execute

Path x:windows
otepad.exe output.txt
Workdir x:	emp
Execute

Deleteall x:	emp*

And finally, from a command prompt, execute the following command:

X:>app RUNIT.TXT

The APP script file pipes the directory listing for the entire X: drive into a temp folder. Once that has completed, Notepad opens the output file for editing. Only once you have closed Notepad are the contents of the temp folder deleted.

AUDITLOG

Citrix has made the AUDITLOG utility available to simplify review of logon/logoff activity on a MetaFrame server. AUDITLOG generates a report based on the Security portion of the event log.

NOTE:

Logon/logoff auditing must be enabled for AUDITLOG to generate any output. Otherwise, you get the following message:

  • Unable to open security event log, make sure logon/logoff auditing is enabled.

See Chapter 16, “Terminal Server Security,” for information on enabling and configuring auditing on your Terminal Server.

Usage:

auditlog [username | session] [/before:mm/dd/yy] [/after:mm/dd/yy]
[/write:filename | [/time | /fail | /all | /detail]] [/eventlog:file-
name]
auditlog /clear[:backup_log_filename]

Option

Function

Username

Generates the report for the specified user.

Session

Generates a report for the specified connection session. This will be the name assigned to the connection type, such as RDP-tcp#1, or CONSOLE. This option is most useful when reporting on the console usage.

/before:mm/dd/yy

Generates the report only for dates before the one entered.

/after:mm/dd/yy

Generates the report only for dates after the one entered.

/write:filename

Writes the output of Auditlog to the specified file. The data is comma-delimited so it can be imported easily into other applications, such as a spreadsheet or database, to produce reports or statistics. If the file already exists, the new data is appended to the end of the file.

/time

Generates a report that displays the logon/logoff times and total time online for each user. The output of this report differs from the standard report. It will list the user name and the logon computer, followed by a list of logon/logoff dates and times and finally the totals. This option in combination with the user name is an excellent way to create a summary of a user’s system habits.

/fail

Generates a report for failed logon attempts only.

/all

Generates a report of all logon/logoff activity. This includes noninteractive logons such as drive mappings or the “logon” of system processes at startup.

/detail

Creates a detailed report of logon/logoff activity. This report reproduces the complete information displayed for each event in the security log pertaining to logon/logoff.

/eventlog:filename

Lets you run Auditlog against a file containing a backup of the security event log. The backup file can be created using the /clear option or from within the event viewer.

/clear[:backup_log_filename]

Clears the event log and saves the current contents to the backup file, if specified. If the file already exists, this command fails.

Examples:

X:>auditlog
DOMAINUSERNAME            EVENT         TIME
NEKITodd                   Logon OK     1/27/2002 22:41
NEKIimevil                 Logon Fail   1/27/2002 22:40
  Reason: Unknown user name or bad password
NEKIAdministrator          Logon OK     1/27/2002 22:38
NEKIAdministrator          Logon OK     1/27/2002 22:28

X:>auditlog /time
User: Todd
   Logon: 1/27/2002 22:41    CurTm:  1/27/2002 22:48    Total:
00:06:58
   Total logon time: 00:06:58

User: Administrator
   Logon: 1/27/2002 22:28    ShutDn: 1/27/2002 22:37    Total:
00:08:33
   Logon: 1/27/2002 22:38     CurTm: 1/27/2002 22:48    Total:
00:10:15
   Total logon time: 00:18:48

X:>auditlog /fail
DOMAINUSERNAME            EVENT        TIME
NEKIimevil                 Logon Fail  1/27/2002 22:40
  Reason: Unknown user name or bad password

CHANGE CLIENT

The CHANGE CLIENT command is used to manage the settings for an active ICA client’s device mappings (disk drive, LPT, and COM ports). Normally this tool updates the settings only for the session within which it is executed and cannot be used to configure other active sessions. The one exception to this is the delete_client_printers parameter, which will affect all users on the server. See the usage part of this section for more information on this option.

CHANGE CLIENT is most often used when certain client device mappings or options must be enforced, either during logon or possibly prior to launching an application.

TIP:

Although you cannot explicitly view any mapped client network printers using the CHANGE CLIENT command, you still can manipulate their availability, including reconnecting default printers and deleting all client printer connections.

Usage:

change client [host_device client_device]
change client [/view | /flush | /current]
change client [{/default | /default_drives | /default_printers}
[/ascending]] [/noremap] [/persistent] [/force_prt_todef] [/delete
host_device]
change client [/delete_client_printers]

Option

Function

host_device client_device

This is common general usage of Change Client. host_device represents the target device on the server, and client_device is the device on the client to be mapped to host_device. For example,

Change Client P: C:

maps the P: drive on the server to the C: drive on the client computer.

/view

Displays the list of all connected client devices.

/flush

Forces the MetaFrame server and the client to resynchronize disk data. MetaFrame caches data from client disk drives to help improve access times. This is not a write cache but simply a cache of information about the client drives. A simple example demonstrates this: Open a client drive on a MetaFrame server through My Computer, go to the local drive on the client (not through MetaFrame) and delete a file, and then return to MetaFrame and close and reopen the client drive. The deleted file still appears in the list.

/current

Displays the current ICA client device mappings. Equivalent to typing Change Client only.

/default

Reconnects the drive and printer mappings to their defaults.

Note: This command won’t delete any existing drive mappings before re-creating the default ones. Running this command multiple times results in multiple client drive mappings pointing to the same client drives. You should use the /noremap parameter with this command to prevent extra mappings from appearing.

/default_drives

Reconnects the host drive mappings to their defaults. See the note in the /default row of this table regarding the actual behavior of this command.

/default_printers

Reconnects the host printer mappings to their defaults. Unlike the drive mappings, the printer mappings are reset to their defaults.

/ascending

Changes the drive order from descending to ascending when searching for available drivers and printers to map. This option is valid only with /default, /default_drives, or /default_printers. By default it searches backwards, starting at the highest available drive letter and working downwards towards A: to assign client drive mappings. When /ascending is used, it starts at the lowest available drive letter and works upwards towards Z:.

/noremap

Prevents any client drive that conflicts with the MetaFrame drive (either physical or mapped) from being mapped to an alternate drive letter. Using this option in combination with /default or /default_drives prevents duplicate mappings to the user’s local drives from appearing.

/persistent

Makes the current client drive mappings persistent by saving them into the user’s profile. These settings are lost if the user has a mandatory profile.

/force_prt_todef

Forces the default printer for the MetaFrame client to map to the default printer on the client’s local desktop.

/delete host_device

Deletes the client device that’s mapped to the device specified by host_device.

/delete_client_printers

Deletes all the client printers from the current user’s session, or all sessions if run by an administrator.

Examples:

C:>change client
Client Mappings on WinStation ICA-tcp#3

Host             Client
A:               \ClientA$
C:               \ClientC$
D:               \ClientD$
F:               \ClientF$
LPT1             \ClientLPT1:
LPT2             \ClientLPT2:
C:change client /delete F:

C:change client
Client Mappings on WinStation ICA-tcp#3

Host             Client
A:               \ClientA$
C:               \ClientC$
D:               \ClientD$
LPT1             \ClientLPT1:
LPT2             \ClientLPT2:

C:change client /default /noremap
Mapping Host Device A: To Client Device A:
Error Mapping Host Device A: to Client A:, The device is being
accessed by an active process.

Mapping Host Device F: To Client Device F:
Mapping Host Device LPT1: To Client Device LPT1:
Mapping Host Device LPT2: To Client Device LPT2:
Client Mappings on WinStation ICA-tcp#3

Host             Client
A:               \ClientA$
C:               \ClientC$
D:               \ClientD$
F:               \ClientF$
LPT1             \ClientLPT1:
LPT2             \ClientLPT2:

CHFARM

CHFARM lets you change the server farm membership of a MetaFrame server. Prior to MetaFrame XP FR2, this utility had to be run from the installation CD. All newer versions of MetaFrame now install this tool on the server by default and allow execution directly off the Terminal Server.

WARNING:

CHFARM should not be used to change the farm membership of a MetaFrame server that contains the local data store for an active farm. Doing so would eliminate the current data store and any published applications or farm settings defined within it. See Chapter 14, “Server Operations and Support,” for information on the proper way to decommission or migrate a server farm.

When you run CHFARM, you first are asked to confirm your desire to change the farm membership for the server. After you say yes, the IMA service is stopped and the Data Store Setup wizard launches. After you complete the wizard, the IMA service is once again started and your server is now a member of a different farm. There are no command line options for this tool.

Usage:

Chfarm

CHGCDM

See the “CHANGE CLIENT” section. CHGCDM provides identical functionality to the CHANGE CLIENT command, including parameter inputs and outputs.

CLTPRINT

This command sets the number of available printer pipes to the client print spooler. This setting has no effect on print jobs spooled on the Terminal Server itself. A printer pipe is used to send data from an application to the client print spooler. The number of available pipes represents the number of print jobs that can be simultaneously sent to a client printer. The default number of printer pipes is 10, which is also the minimum.

The value for the number of printer pipes is maintained in the registry key:

  • HKLMSystemCurrentControlSetControlPrintMonitorsClient Printer PortParametersNumClientPrinterPipes

TIP:

If you change the number of available printer pipes, you must stop and restart the spooler service for the changes to take effect.

Usage:

cltprint [/q] [/pipes:nn]

Option

Function

/q

Displays the current number of printer pipes.

/pipes:nn

Sets the number of available printer pipes. nn must be between 10 and 63.

Examples:

X:>cltprint /q
CLTPRINT No registry value found for Client Printer Pipes (error = 2)

          CLTPRINT /PIPES: <number> can be used to set the number of
          pipes

          use CLTPRINT /? for more information

X:cltprint /pipes:12

CLTPRINT Spooler must be stopped and restarted
             to enable new Pipe Instances setting

X:cltprint /q

The registry value for number of Client Printer Pipe Instances = 12

CTXXMLSS

CTXXMLSS lets you change the listening port for the Citrix XML Service.

TIP:

If the XML service is not sharing port 80 with IIS, the running service will be visible on the Terminal Server when the NET START command is issued by an administrator. In this situation you must stop the Citrix XML Service before you can change the XML listening port. The easiest way to do this is to issue the following command from a command prompt:

net stop "Citrix XML Service"

When you are ready to restart the service, simply run

net start "Citrix XML Service"

If the XML service is sharing port 80 with IIS, it will not appear in the service list and is not required to be stopped in order for these changes to take effect.

For complete information on the Citrix XML Service, including sharing port 80 with IIS, refer to Chapter 13, “MetaFrame Presentation Server Installation.”

Usage:

ctxxmlss [/Rnnn] | [/U] | [/Knnn]

Option

Function

/Rnnn

Specifies the new listening port as nnn. You must select a port that is not already in use on the server.

/U

Deletes the XML service information out of the registry. This command will not stop the service; you must do so manually.

/Knnn

Lets you change the keep-alive value for the XML connection in seconds. The default is nine seconds.

Examples:

X:>net stop "Citrix XML Service"

The Citrix XML Service service was stopped successfully.

X:>ctxxmlss /u

X:>ctxxmlss /R83
Citrix XML Service: The service is now registered on port number 83.

X:>net start "Citrix XML Service"
The Citrix XML Service service is starting.
The Citrix XML Service service was started successfully.

X:>netstat –a p TCP

Active Connections

  Proto  Local Address           Foreign Address              State
  TCP    neki:83                 neki.NR1.com:0  LISTENING
  TCP    neki:epmap              neki.NR1.com:0  LISTENING
  TCP    neki:microsoft-ds       neki.NR1.com:0  LISTENING
  TCP    neki:1494               neki.NR1.com:0  LISTENING
  TCP    neki:3389               neki.NR1.com:0  LISTENING
  TCP    neki:netbios-ssn        neki.NR1.com:0  LISTENING
  TCP    neki:1494               ICAClient1.NR1.com:1380   ESTABLISHED

DSCheck

This command performs an integrity check against the data store. If the integrity check fails, this command can be run with the /clean switch to fix any of the inconsistencies detected when DSCheck was first run.

Usage:

dscheck [/clean]

Option

Function

/clean

Deletes inconsistent records from the data store.

WARNING:

It is recommended that you back up your data store prior to running the DSCHECK utility with the /clean option.

DSMAINT RECOVER

The DSMAINT RECOVER command is used to restore an Access data store from its backup file. The backup file (mf20.bak) is located in the same folder as the data store (mf20.mdb), which is normally the following:

  • %ProgramFiles%CitrixIndependent Management Architecture

Whenever the IMA service is safely shut down, it automatically creates a copy of mf20.mdb called mf20.unk. When the IMA service restarts, it deletes mf20.bak and renames mf20.unk to mf20.bak. This process exists as an attempt to ensure that a valid backup of the data store is always available.

Before DSMAINT RECOVER can be run, the IMA service must be stopped. When you run DSMAINT RECOVER, it renames the current mf20.mdb to mf20.sav and then renames mf20.bak to mf20.mdb. You must manually restart the IMA service to complete the recovery operation.

TIP:

See Chapter 14 for an example of an automated recovery process that includes use of the DSMAINT RECOVER command.

Usage:

dsmaint recover

Examples:

X:>dsmaint recover
ERROR: Cannot run this option while IMA service is running.
Please stop IMA service before continuing.
Recover local data store from last known good backup.
This option requires that the IMA Service be stopped, and is avail-
able
when using MS-Access or MSDE as your Data Store.

X:>net stop "Independent Management Architecture"
The Independent Management Architecture service is stopping.
The Independent Management Architecture service was stopped success-
fully.

X:>dsmaint recover
Attempting to connect to the data store with new configuration set-
tings.
Successfully connected to the data store.

X:>net start "Independent Management Architecture"
The Independent Management Architecture service is starting..
The Independent Management Architecture service was started success-
fully.

DSMAINT Backup

This command is used to back up the Access data store to another location. The destination can be on either the MetaFrame Server or an alternate network location. This command won’t back up a SQL or Oracle database.

Usage:

dsmaint backup <destination_path>

Option

Function

destination_path

The location where you want the data store copied. The target folder must already exist. You do not need to include a file name.

Examples:

X:>dsmaint backup \BackupServMFStore
Database file was copied to::\BackupServMFStoremf20.mdb

DSMAINT COMPACTDB

The DSMAINT COMPACTDB command is used to compact the Access data store. Compacting eliminates wasted space inside the Jet database and helps optimize performance. If the IMA service is running on the MetaFrame server housing the data store (the direct server), this command can be executed on any MetaFrame server in the farm. If the IMA service is not running, DSMAINT COMPACTDB can be executed only from the direct server.

Usage:

dsmaint compactdb [/ds] [/lhc]

Option

Function

/ds

Compacts the data store (mf20.mdb).

/lhc

Compacts the local host cache (imalhc.mdb).

Examples:

X:>dsmaint compactdb /ds /lhc
Compact DB operation succeeded

DSMAINT CONFIG

This utility is used to change the connection parameters used by the IMA service to connect to a data store.

On an Access data store, this command resets the ID and/or password and updates the corresponding settings for the IMA service so it has access to the database. Once you have made the desired change to the Access data store, the IMA service must be restarted before the changes take effect.

When applying this command against a SQL or Oracle database, you must include a data source name with the /dsn option.

NOTE:

The default user name and password on the Access data store (mf20.mdb) is citrix/citrix.

Usage:

dsmaint config [/user:username] [/pwd:password] [/dsn:filename]

Option

Function

/user:username

The new user name to use for database connectivity.

/pwd:password

The new password to use for database connectivity.

/dsn:filename

Lets you specify a file DSN to use to connect to the data store. If the DSN you provide differs from the current setting, the server points to the new data store.

Examples:

C:>dsmaint config /user:todd /pwd:password
Attempting to connect to the data store with new configuration set-
tings.
Successfully connected to the data store.
Configuration successfully changed.
Please restart the IMA Service for changes to take effect.

DSMAINT FAILOVER

Changes the direct server location that a MetaFrame server uses to access the data store. Typically, this command is used when an alternate data store has been created and the existing MetaFrame servers need to be redirected to point to this new server.

This command is valid only on MetaFrame servers that make indirect connections to the server farm’s data store.

Usage:

dsmaint failover direct_server

Option

Function

direct_server

The MetaFrame server that is directly connected to the data store.

Example:

X:>dsmaint failover mfds01.nrtest.com

DSMAINT MIGRATE

This command is used to migrate the data store from one database to another. For example, you could use DSMAINT MIGRATE to migrate your data store from Access to Microsoft SQL Server.

TIP:

See Chapter 14 for an example of migrating a data store from Access to SQL Server using the DSMAINT MIGRATE command.

Usage:

dsmaint migrate {/srcdsn:sdsn} [/srcuser:susername] {/srcpwd:spassword}
{/dstdsn:ddsn} [/dstuser:dusername]  [/dstpwd:dpassword]

Option

Function

/srcdsn:sdsn

The DSN file for the existing data store that you wish to migrate. By default, the data store DSN called MF20.DSN is located in the folder “%ProgramFiles%CitrixIndependent Management Architecture”.

/srcuser:susername

The user name used to authenticate against the source data store. The default user name for the Access data store is “citrix”.

/srcpwd:spassword

The password used to authenticate against the source data store. The default password for the Access data store is “citrix”.

/dstdsn:ddsn

The DSN file for the destination data store that you wish to migrate to.

/dstuser:dusername

The user name used to authenticate against the destination data store.

/dstpwd:dpassword

The password used to authenticate against the destination data store.

Examples:

X:>dsmaint migrate /srcdsn:"x:program filescitrixindependent man-
agement architecturemf20.dsn" /srcuser:toddm /srcpwd:password /dstd-
sn:"y:admin toolsSQL.dsn" /dstuser:toddm /dstpwd:password

DSMAINT PUBLISHSQLDS

This command is required only if you are currently using a Microsoft SQL Server data store and planning to create a distributed environment by making this SQL Server a Publisher.

The DSMAINT PUBLISHSQLDS command should be executed from the server that initially created the farm. Once executed, it runs the required SQL statements to create the published articles on the SQL Server. Remote SQL Servers can then be configured to “subscribe” to these published articles.

TIP:

Please consult the Microsoft SQL Server 2000 documentation or the SQL Server 2000 Resource Kit for further information on SQL Server replication.

Usage:

dsmaint publishsqlds {/user:username /pwd:password}

Option

Function

/user:username

The username required to authenticate on the SQL Server data store.

/pwd:password

The password required to authenticate on the SQL Server data store.

DSMAINT RECREATELHC

DSMAINT RECREATELHC will re-create the local host cache on the server on which it is run. This command takes no parameters, but the IMA service must be stopped on the server where the local host cache will be recreated.

Usage:

dsmaint recreatelhc

Examples:

X:>dsmaint recreatelhc
Recreating LHC database finished successfully.

DSMAINT VERIFYLHC

This command validates the integrity of the local host cache. If the /autorepair switch is provided, any inconsistencies will attempt to be corrected. In order for this command to run properly, the local host cache must be running.

Usage:

dsmaint verifylhc [/autorepair]

Option

Function

/autorepair

Will automatically repair any issues found during the integrity check.

Examples:

X:>dsmaint verifylhc
The LHC integrity has been verified successfully.

ICAPORT

ICAPORT is used to set the TCP/IP listening port number used by a MetaFrame server for ICA connections. By default, MetaFrame listens for TCP/IP client connections on port 1494. You can use ICAPORT to change this port to any number in the range 0 to 65535. If you change the port number, you must restart the server for the changes to take effect. ICAPORT updates the following registry value: HKLMSystemCurrentControlSetControlTerminal ServerWinstationsICAtcpPortNumber

WARNING:

When assigning an alternate port number, make sure it’s not already in use. Avoid well-known TCP and UPD port numbers such as 80 (for HTTP or the Citrix XML Service) or 23 (for Telnet).

While ports 1 through 1024 are reserved for this purpose, some ports above this are also commonly used, such as many in the 6000 range that are used for X11 (a graphical UNIX interface). The following list shows some commonly assigned ports:

21: FTP

67: BOOTP/DHCP

110: POP3

177: X11 logons

2049: NFS

6667: IRC

After the port number has been changed, all clients that want to connect to the MetaFrame server will need their client updated as well. To assign an alternate port on the client, simply use the standard TCP/IP convention of assigning a port number by appending :<port number> immediately after the IP address or DNS name. For example, entering “ORCA:7832” as the MetaFrame server name would tell the client to attempt to establish an ICA connection with ORCA on port 7832. If you defined the wrong port or attempted to connect to a server that had had the default port changed, you would get a message stating that the MetaFrame server was not accepting connections.

TIP:

You can also specify the port number by adding ICAPortNumber=nnn to the APPSRV.INI file on the client. This file contains the configuration information normally set using the Citrix ICA client. You can add this entry in one of two places. If you add it to the [WFCLIENT] section of the file, the defined port number will be used by all MetaFrame client entries. If you add this value to an individual server key, shown as [<servername>] in the file, the alternate port will be used for only that server entry.

Usage:

icaport {query | /port:nnn | /reset}

Option

Function

/query

Displays the current setting for ICAPORT.

/port:nnn

Reassigns the listening TCP/IP port number.

/reset

Resets the port number to the default of 1494.

Examples:

X:>icaport /query
TCP/IP port for Winstation ICA-tcp is set to: 1494

X:>icaport /port:7832
TCP/IP port for Winstation ICA-tcp is set to: 7832

X:>icaport /reset
TCP/IP port for Winstation ICA-tcp is set to: 1494

IMAPORT

IMAPORT lets you modify the TCP/IP port for the IMA service, the management console, and the outbound communication port for an indirect data store connection. This command modifies these settings on the local server only. The following ports are used by default:

  • IMA service—2512 (inbound)

  • Management console—2513 (inbound)

  • Indirect data store—2512 (outbound to direct data store server)

After modifying any of the port numbers, you must restart the IMA service for the changes to take effect. When two servers need to perform server-to-server communications, the appropriate ports to communicate on are retrieved from the data store for the farm.

If you modify the inbound management console port, when you launch the MetaFrame Presentation Server Management Console you will need to specify the port to communicate on. This can be done by modifying the shortcut for the application as follows: C:Program FilesCitrixAdministrationctxload.exe –port:<new port number> where <new port number> is the alternate port you specified.

WARNING:

The same warning applies to the IMAPort as it did for the ICAPort. When assigning an alternate port number, make sure it’s not already in use. Avoid well-known TCP and UPD port numbers such as 80 (for HTTP or the Citrix XML Service) or 23 (for Telnet).

Usage:

imaport {query} | {/set <IMA:port> | <DS:port> | <CMC:port>} |
{/reset IMA | DS | CMC | ALL}

Option

Function

/query

Displays the current setting for ImaPort.

/set IMA:port

Sets the specified port to the provided value.

      DS:port

 

      CMC:port

 

/reset IMA | DS | CMC | ALL

Resets the specified port to its default value.

Examples:

X:>imaport /query
TCP/IP port for IMA communication is set to: 2512
TCP/IP port for CMC connection is set to:    2513

X:>imaport /set ima:3000
For the new port setting to take effect, you must restart the
Independent
Management Architecture service.

X:>imaport /query
TCP/IP port for IMA communication is set to: 3000
TCP/IP port for CMC connection is set to:    2513

QUERY FARM

QUERY FARM displays information about all available MetaFrame Presentation Servers in your server farm, using information gathered from the farm’s data store. When the servers are listed, the current data store server is shown with the letter “D,” situated to the right of the network address.

Usage:query farm [[servername] [/addr | /app [name] | /load |
/process]] [/tcp] [/ipx] [/netbios] [/app [name] | /disc | /load |
/process] [/zone [zonename]] [/zoneapp [appname]] [zoneload]
[/offline] [/online] [/continue]

Option

Function

Servername

Name of the server to query. The name is entered without the double backslash (\) characters.

/addr

Displays network address data for the specified server.

/app [name]

Displays a list of published application names, the servers on which they are published, and their app and server loads. If the name is specified, only the information for that specific application is returned.

/load

Displays the load for either the specified server or all servers in the farm.

/tcp

Shows only TCP/IP information.

/ipx

Shows only IPX information.

/netbios

Shows only NetBIOS information.

/disc

Displays information on disconnected sessions.

/process

Lists all the active processes. If a server name is specified, only the processes on that server are listed; otherwise, all processes on all servers in the farm are listed.

/zone [zonename]

Displays all zones and their associated zone data collector. If zonename is included, only the data for that zone is displayed.

/zoneapp [appname]

Lists the published applications and their server load for the local zone. Including appname will display only that specific application name.

/zoneload

Displays the servers and their associated load for the current zone only.

/offline

Displays servers currently offline. Servers may be taken offline for maintenance or could be down because of a hardware failure.

/online

Displays servers that are online.

/continue

Suppresses pausing after each page of output.

Examples:

X:>query farm

Server             Transport   Network Address
_____________      __________  ______________
NEKI*              TCP/IP      192.168.1.103 D
HILO               TCP/IP      192.168.1.104

X:> query farm /zone
Zone Name           Data Collector
_________________   _____________________
192.168.1.0                       NEWTON
192.168.2.0                       PASCAL
192.168.3.0                       FOURIER

QUERY SERVER

QUERY SERVER is a legacy tool for use when run in a mixed-mode MetaFrame server farm (interoperability mode) or if you have MetaFrame 1.x servers in your environment that you would like to monitor from a MetaFrame Presentation Server. QUERY SERVER displays information about all available MetaFrame 1.x servers in your environment. QUERY SERVER uses information from the ICA master browser to gather the statistics that are displayed. This tool provides a quick way to view much of the information that would normally be available through the MetaFrame Administration tool.

TIP:

QUERY SERVER queries the MetaFrame 1.x servers on only one network card at a time. If you have two or more network cards on your server, to access the MetaFrame 1.x servers on the other card’s network you must specify the proper address of any MetaFrame server on that subnet.

Usage:

query server [[servername] [[/ping] [/count:n] [/size:n]]| [/stats |
/reset | /load | /addr | /debugnhwatch]] [/tcp] [/ipx]
[/netbios][/tcpserver:x] [/ipxserver:x] [/netbiosserver:x] [/license
| /app | /gateway | /serial | /disc | /serverfarm |/video | /update |
/election | /delete] [/continue] [/DEBUG:n]

Option

Function

servername

Name of the server to query. The name is entered without the double backslash (\) characters.

/ping

Pings the named server.

/count:n

Number of times to ping. The default is 5.

/size:n

Byte size of the ping packet. The default is 256.

/stats

Displays the browser statistics.

/reset

Resets the browser statistics.

/load

Displays load-balancing data (valid only when the server has load balancing installed).

/addr

Displays network address data.

/debugnhwatch

Displays Program Neighborhood debugging information for the specified server. You must include the MetaFrame server name in order for this parameter to work properly. When run, it displays diagnostic information about what the server “knows” about the farm it belongs to and the applications available.

/tcp

Shows TCP/IP information.

/ipx

Shows IPX information.

/netbios

Shows NetBIOS information.

/tcpserver:x

Sets the default TCP/IP server address to x.

/ipxserver:x

Sets the default IPX server address to x.

/netbiosserver:x

Sets the default NetBIOS server address to x.

/license

Displays the user licenses.

/app

Displays published application names and corresponding servers.

/gateway

Shows the configured ICA gateway addresses.

/serial

Shows license serial numbers.

/disc

Displays information on disconnected sessions.

/serverfarm

Displays the known server farm names and their loads.

/video

Displays VideoFrame information.

/update

Forces the ICA browser update information to be sent to the master ICA browser immediately. If a server name exists in the servername parameter, then only that server sends updated information; otherwise, all Citrix servers send their update information.

/election

Forces an ICA browser election.

/delete

Forces deletion of the ICA master browser data. The master browser eventually reconstructs its database as update information comes in from the other Citrix servers on the network.

/continue

Suppresses pausing after each page of output.

/DEBUG:n

Displays debug messages. After the nth message, the application halts automatically.

Examples:

X:>query server
WARNING:  The MetaFrame server is not operating in interoperability
mode.
Please use the QUERY FARM command for reporting IMA based server
data.

Server                Transport Conns Free  Total  Network Address
_____________         _________ _____ ____  _____  _______________
0MF18SRV              TCP/IP    0      15    15     10.10.10.10 M

TIP:

When running this command, you see only those servers running the ICA browser service or running in interoperability mode. MPS servers running in native mode are not displayed.

TWCONFIG

TWCONFIG is the thinwire configuration utility you can use to adjust the ICA display options for your ICA clients. These settings can also be managed on a server-by-server basis or for the entire farm through the Citrix Management Console (CMC). Figure B.3 shows the ICA display properties for a server farm through the CMC. Using the TWCONFIG command, you can adjust only the settings for the server on which it is run.

Farm-wide ICA display settings within the Citrix Management Console.

Figure B.3. Farm-wide ICA display settings within the Citrix Management Console.

NOTE:

By default, MetaFrame Presentation Servers are configured to inherit their ICA display settings from the farm. If you run the TWCONFIG /q command while the inherit option is enabled, TWCONFIG displays the settings for the farm, not the settings for the individual computer.

Usage:

twconfig [/query] [/server:server] [/default] | [/inherit:on|off] |
[/discard:on|off] | [/supercache:on|off] | [/maxmem:nnn] |
[/degrade:res|color] | [notify:on|off] | [/Srvsrcpaint:on|off]

Option

Function

/query

Returns the current settings. If inherit is on, the returned information corresponds to the settings applied to the entire farm.

/server:server

You can provide the name of a remote server to configure.

/inherit:on|off

When set on, the ICA display settings for the farm are used. When off, the settings defined on the server are used. On is the default.

/discard:on|off

When on, redundant graphics operations are discarded. On is the default.

/supercache:on|off

When on, the alternate Citrix bitmap caching technique is used. On is the default.

/maxmem:nnn

The maximum memory in KB that can be used by each client session for graphics operations. The valid range is 150KB to 7500KB. The default value is 5625KB.

/degrade:res|color

Determines what factor is reduced first if the video mode requested by the client is unavailable. This occurs when the maxmem value has been reached. Either the screen resolution or the color depth can be degraded. The default is resolution.

/notify:on|off

When on, users are notified if the desired video mode is not available (maxmem has been reached). On is the default.

/default

Utilizes the default settings from the farm instead of the server-specific settings.

/srvsrcpaint:on|off

Performs the srcpaint method on the server instead of on the client. By default, this switch is off. This switch was added to resolve a specific srcpaint drawing issue. Do not enable this option unless absolutely necessary. See the Citrix documentation for hotfix XE103W2K040 for more information.

Examples:

X:>twconfig /inherit:off
Update successful

X:>twconfig /notify:off
Update successful

X:>twconfig /q
INHERIT:    off
DISCARD:    on
SUPERCACHE: on
SRVSRCPAINT: off
DEGRADE:    res
NOTIFY:     off
MAXMEM:     5625 kilobytes
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.162.216