Tuesday, April 19, 2011

XenApp Commands


Acrcfg: Configure auto-reconnect settings.
Use acrcfg to configure Auto Client Reconnect settings for a server or a server farm.
Syntax
acrcfg [/server:servername | /farm]   [/query | /q]
acrcfg [/server:servername | /farm] [/require:on | off] [/logging:on | off]
acrcfg [/server:servername | /farm] [/require:on | off] [/logging:on | off]
acrcfg [/server:servername] [/inherit:on | off] [/require:on | off] [/logging:on | off]
acrcfg [/?]
Parameters
servername
The name of a server running Citrix XenApp
Options
/query
/q
Query current settings.
/server
The server to be viewed or modified by the other command-line options. The server specified by servername must be in the same server farm as the server on which the command is run. This option and the /farm option are mutually exclusive. The local server is the default if neither /server nor /farm is indicated.
/farm
The options on the command-line after /farm are applied to the entire server farm.
/inherit:on | off
To use the Auto Client Reconnect settings from the server farm, set /inherit to on for a server. To disregard the Auto Client Reconnect settings from the server farm, set /inherit to off. By default, /inherit is set to on for a server.
/require:on | off
If you want users to be prompted for credentials during automatic reconnection, set /require to on. Servers inherit the server farm setting unless /inherit is off. To allow users to automatically reconnect to disconnected sessions without providing credentials, set /require to off. By default, /require is set to off for both a server and a server farm.
/logging:on | off
You can enable logging of reconnections in the Application Event log on a server. Logging can be set only when /required is set to off. Logging is set to off for both servers and server farms by default.
/?
Displays the syntax for the utility and information about the utility’s options.
Remarks
Enabling automatic reconnection allows users to resume working where they were interrupted when an connection was broken. Automatic reconnection detects broken connections and then reconnects the users to their sessions.
However, automatic reconnection can result in a new session being launched (instead of reconnecting to an existing session) if a plugin’s cookie, containing the key to the session ID and credentials, is not used. The cookie is not used if it has expired, for example, because of a delay in reconnection, or if credentials must be reentered because /require is set to on. Auto Client Reconnect is not triggered if users intentionally disconnect.
The Auto Client Reconnect feature is enabled by default and can be disabled using the icaclient.adm file or an ICA file only on the Citrix XenApp Plugin for Hosted Apps or with the Web Interface.
The /require and /logging options are valid with either /server or /farm, but /inherit is not used with /farm. If neither /server nor /farm is selected and the /inherit, /require, or /logging options are used, they are applied to the local server. You can set /require only when /inherit is set to off. You can set logging only when /require and /inherit are set to off. When logging is not valid, it disappears from later queries. A query shows the required setting whether or not it is on.
Settings and values are not case-sensitive.
Examples
The following four commands result in the following configurations:
  • Require users to enter credentials when they automatically reconnect to servers configured to inherit farm-wide settings
  • Show the results
  • Allow users to be reauthenticated automatically to the local server and set the server to log plugin reconnections
  • Show the results
C:\>acrcfg /farm /require:onUpdate successfulC:\>acrcfg /farm /qAuto Client Reconnect Info for: Farm-wide SettingsREQUIRE: onC:\>acrcfg /inherit:off /require:off /logging:onUpdate successfulC:\>acrcfg /qAuto Client Reconnect Info for: Local ServerINHERIT:offREQUIRE:offLOGGING:on
Security Restrictions
To make changes, you must be a Citrix administrator with Windows administrator privileges.


Altaddr:  Specify server alternate IP address.
Use altaddr to query and set the alternate (external) IP address for a server running Citrix XenApp. The alternate address is returned to clients that request it and is used to access a server that is behind a firewall.
Syntax
altaddr [/server:servername] [/set alternateaddress] [/v]
altaddr [/server:servername] [/set adapteraddress alternateaddress] [/v]
altaddr [/server:servername] [/delete] [/v]
altaddr [/server:servername] [/delete adapteraddress] [/v]
altaddr [/?]
Parameters
servername
The name of a server.
alternateaddress
The alternate IP address for a server.
adapteraddress
The local IP address to which an alternate address is assigned.
Options
/server:servername
Specifies the server on which to set an alternate address. Defaults to the current server.
/set
Sets alternate TCP/IP addresses. If an adapteraddress is specified, alternateaddress is assigned only to the network adapter with that IP address.
/delete
Deletes the default alternate address on the specified server. If an adapter address is specified, the alternate address for that adapter is deleted.
/v (verbose)
Displays information about the actions being performed.
/?
Displays the syntax for the utility and information about the utility’s options.
Remarks
The server subsystem reads the altaddr settings for server external IP addresses at startup only. If you use altaddr to change the IP address setting, you must restart the Citrix Independent Management Architecture service for the new setting to take effect.
If altaddr is run without any parameters, it displays the information for alternate addresses configured on the current server.
Examples
Set the server’s alternate address to 1.1.1.1:
altaddr /set 1.1.1.1
Set the server’s alternate address to 2.2.2.2 on the network interface card whose adapter address is 1.1.1.1:
altaddr /set 2.2.2.2 1.1.1.1
Security Restrictions
None.

App: Run application execution shell.

APP

App is a script interpreter for secure application execution. Use App to read execution scripts that copy standardized .ini type files to user directories before starting an application, or to perform application-related cleanup after an application terminates. The script commands are described below.

Syntax

app scriptfilename

Parameters

scriptfilename
The name of a script file containing app commands (see script commands below).

Script Commands

copy sourcedirectory\filespec targetdirectory
Copies files from sourcedirectory to targetdirectory. Filespec specifies the files to copy and can include wild cards (*,?).
deletedirectory\filespec
Deletes files owned by a user in the directory specified. Filespec specifies the files to delete and can include wild cards (*,?). See the Examples section for more information.
deleteall directory\filespec
Deletes all files in the directory specified.
execute
Executes the program specified by the path command using the working directory specified by the workdir command.
path executablepath
Executablepath is the full path of the executable to be run.
workdir directory
Sets the default working directory to the path specified by directory

Script Parameters

directory
A directory or directory path.
executablepath
The full path of the executable to be run.
filespec
Specifies the files to copy and can include wildcards (*,?).
sourcedirectory
The directory and path from which files are to be copied.
targetdirectory
The directory and path to which files are to be copied.

Remarks

If no scriptfilename is specified, app displays an error message.
The Application Execution Shell reads commands from the script file and processes them in sequential order. The script file must reside in the %SystemRoot%\Scripts directory.

Examples

The following script runs the program Notepad.exe. When the program terminates, the script deletes files in the Myapps\Data directory created for the user who launched the application:
PATH C:\Myapps\notepad.exeWORKDIR C:\Myapps\DataEXECUTEDELETE C:\Myapps\Data\*.*
The following script copies all the .wri files from the directory C:\Write\Files, executes Write.exe in directory C:\Temp.wri, and then removes all files from that directory when the program terminates:
PATH C:\Wtsrv\System32\Write.exeWORKDIR C:\Temp.wriCOPY C:\Write\Files\*.wri 
C:\Temp.wriEXECUTEDELETEALL C:\Temp.wri\*.*
The following example demonstrates using the script file to implement a front-end registration utility before executing the application Coolapp.exe. You can use this method to run several applications in succession:
PATH C:\Regutil\Reg.exeWORKDIR C:\RegutilEXECUTEPATH C:\Coolstuff\Coolapp.exeWORKDIR
C:\TempEXECUTEDELETEALL C:\Temp

Security Restrictions

None.

 Auditlog: Generate server logon/logoff reports.
Auditlog generates reports of logon/logoff activity for a server based on the Windows Server security event log. To use auditlog, you must first enable logon/logoff accounting. You can direct the auditlog output to a file.
Syntax
auditlog [username | session] [/eventlog:filename] [/before:mm/dd/yy] [/after:mm/dd/yy]
[[/write:filename] | [/detail | /time] [/all]]
auditlog [username | session] [/eventlog:filename] [/before:mm/dd/yy] [/after:mm/dd/yy]
[[/write:filename] | [/detail] | [/fail ] | [ /all]]
auditlog [/clear:filename]
auditlog [/?]
Parameters
filename
The name of the eventlog output file.
session
Specifies the session ID for which to produce a logon/logoff report. Use this parameter to examine the logon/logoff record for a particular session.
mm/dd/yy
The month, day, and year (in two-digit format) to limit logging.
username
Specifies a user name for which to produce a logon/logoff report. Use this parameter to examine the logon/logoff record for a particular user.
Options
/eventlog:filename
Specifies the name of a backup event log to use as input to auditlog. You can back up the current log from the Event Log Viewer by using auditlog /clear: filename.
/before:mm/dd/yy
Reports on logon/logoff activity only before mm/dd/yy.
/after:mm/dd/yy
Reports on logon/logoff activity only after mm/dd/yy.
/write:filename
Specifies the name of an output file. Creates a comma-delimited file that can be imported into an application, such as a spreadsheet, to produce custom reports or statistics. It generates a report of logon/logoff activity for each user, displaying logon/logoff times and total time logged on. If filename exists, the data is appended to the file.
/time
Generates a report of logon/logoff activity for each user, displaying logon/logoff times and total time logged on. Useful for gathering usage statistics by user.
/fail
Generates a report of all failed logon attempts.
/all
Generates a report of all logon/logoff activity.
/detail
Generates a detailed report of logon/logoff activity.
/clear:filename
Saves the current event log in filename and clears the Event log. This command does not work if filename already exists.
/?
Displays the syntax for the utility and information about the utility’s options.
Remarks
Auditlog provides logs you can use to verify system security and correct usage. The information can be extracted as reports or as comma-delimited files that can be used as input to other programs.
You must enable logon/logoff accounting on the local server to collect the information used by auditlog. To enable logon/logoff accounting, log on as a local administrator and enable logon/logoff accounting with the Audit Policy in Microsoft Windows.
Security Restrictions
To run auditlog, you must have Windows administrator privileges.


will update the below mentioned commands soon...............









change client: Change client device mapping.
 Chfarm: Change the server farm membership of the server, create an additional farm, and configure a replacement data store.
Ctxkeytool: Generate farm key for IMA encryption.
Ctxxmlss: Change the Citrix XML Service port number.
Dscheck: Validate the integrity of the server farm data store.
Dsmaint: Maintain the server farm’s data store.
 Enablelb: Enable load balancing for servers that fail health monitoring tests.
Icaport: Configure TCP/IP port number used by the ICA protocol on the server.
imaport Change IMA ports.
migratetosqlexpress Migrate the server farm’s data store from a Microsoft Access database to a SQL Server Express database.
query View information about server farms, processes, ICA sessions, and users.
twconfig Configure ICA display settings.

No comments:

Post a Comment