Using LCSCmd.exe to Prepare Active Directory
Microsoft Office Communications Server 2007 and Microsoft Office Communications Server 2007 R2 will reach end of support on January 9, 2018. To stay supported, you will need to upgrade. For more information, see Resources to help you upgrade your Office 2007 servers and clients.
LCSCmd.exe is copied to %programfiles%\Common Files\Microsoft Office Communications Server 2007 during installation. Run LCSCmd.exe from a command prompt on either Standard Edition or Enterprise Edition CDs or from any existing local deployment folder such as <local drive>:Program Files\Common Files\Microsoft Office Communications Server 2007 during installation.
Syntax for using LCSCmd.exe to prepare Active Directory for an Office Communications Server deployment includes:
Forest-related actions:
LCSCmd.exe /Forest[:<forest FQDN>] /Action:<action name> [Parameter 1][Parameter N]
Domain-related actions:
LCSCmd.exe /Domain[:<domain FQDN>] /Action:<action name> [Parameter 1][Parameter N]
Server-related actions
LCSCmd.exe /Server[:{server FQDN}] /Action:{action name} [Parameter 1][Parameter N]
Information enclosed in brackets ([ ]) is optional. Anything not enclosed in brackets must be specified. Information enclosed in braces ({ }) is a set of options. Mutually exclusive items are separated by a vertical bar ( | ). One of the options separated by the vertical bar can be specified but not multiple options. When a parameter can contain one or more values, these values are separated by a comma.
The syntax indicates the action, and the parameters for the action. The executed command defaults to the local context unless a Fully Qualified Domain Name (FQDN) parameter value is provided. Thus, specifying the syntax, /Forest, /Domain, or /Server, without a FQDN parameter value will assume a local forest, domain, or server.
When the FQDN domain or server is supplied, such as /Forest:<forest FQDN>, /Domain:<domain FQDN>, or /Server:<server FQDN>, the action occurs on the specified forest, domain, or server.
By default, successful LCSCmd.exe-related actions are logged to %temp% as <ActionName>[<date>][<time>].html.
To specify a file path for logged actions, use the /l switch as follows:
/l:<full path file name>
To disable logging, use a hyphen (-) as the log file name.
/l:-
To save the log as an XML file, specify the format as follows:
/XML
The log default path is displayed at the end of each action. Using /l:<full path log file name> and /XML will override defaults for the file path of the log and the format of the logs, respectively.
Command help is available at any point and is relevant to the specified context. For instance, you can get help on LCSCmd.exe for the forest context as follows:
LCSCmd.exe /Forest /?
For a list of the most commonly used command-line parameters and actions see LCSCmd.exe Parameters and Switches later in this document.
When you run LCSCmd.exe, the command automatically discovers the global catalog server and primary domain controllers. If you experience problems because these servers are unavailable or network connectivity is poor, you can use optional parameters to specify the global catalog server or domain controllers to use instead. For more information, see Optional LCSCmd.exe Parameters for Domain Controller and Global Catalog Server Discovery later in this document.
Actions for Preparing Schema and Forests
Forest actions are used for initial deployment procedures and generally impact more than one domain in an Active Directory forest, including domains in the forest, domains prepared for Office Communications Server 2007, the schema naming context, and the configuration naming context.
Forest actions require the /Forest switch with LCSCmd.exe and the /Forest parameter defaults to the local forest unless a remote one is specified. We recommend that all procedures run from the local forest to reduce administrator workload. To run the action on another forest, specify a remote forest FQDN, (/Forest:<forest FQDN>). A common best practice is to obtain all relevant permissions and authorizations before starting this action.
Forest preparation includes the following actions:
Action | Description |
---|---|
SchemaPrep |
Prepares schema by uploading Office Communications Server schema extensions. For more information, see Preparing the Schema. |
CheckSchemaPrepState |
Checks Active Directory schema state. For more information, see Preparing the Schema. |
ForestPrep |
Prepares the forest to host Office Communications Server. For more information, see Preparing the Forest. |
CheckForestPrepState |
Checks whether the forest has been prepared for Office Communications Server. For more information, see Preparing the Forest. |
ForestUnprep |
Removes the preparation from the forest to host Office Communications Server. For more information, see Preparing the Forest. |
CheckAllDomainsPrepState |
Checks whether all domains in the forest have been prepared to host Office Communications Server. For more information, see Preparing the Forest. |
CheckAllPoolsState |
Lists all pools in a forest together with their states. For more information, see Checking Pools. |
CheckPoolState |
Checks the pool's state. For more information, see Checking Pools. |
CreatePool |
Creates a pool for Office Communications Server Enterprise Edition servers in the forest. For more information, see Creating Pools. |
RemovePool |
Removes a pool from the forest. For more information, see Removing Pools. |
UpdatePoolBackend |
Updates the backend for a pool. For more information, see Updating Pools. |
Diag |
Runs extensive diagnostic analysis. For more information, see Running Server Diagnostics. |
Actions for Preparing Domains and Managing Permissions
Domain actions prepare a domain or several domains to host Office Communications Server and check the validity of those actions. Domain actions require the /Domain switch with LCSCmd.exe and help manage the Office Communications Server domain.
As with forest actions, the /Domain parameter defaults to the local domain unless a FQDN remote domain is specified, such as /Domain:<domain FQDN>. Domain preparation includes the following actions:
Action | Description |
---|---|
DomainPrep |
Prepares the domain to host Office Communications Server. For more information, see Preparing Domains. |
CheckDomainPrepState |
Checks whether the domain has been prepared to host Office Communications Server. For more information, see Preparing Domains. |
DomainUnPrep |
Removes the preparation from the domain to host Office Communications Server. For more information, see Preparing Domains. |
CreateLcsOuPermissions |
Creates permissions for Office Communications Server groups on the specified container for User, Contact, InetOrgPerson or Computer type objects.For more information, see Managing Permissions on a Domain. |
CheckLcsOuPermissions |
Checks whether permissions for Office Communications Server groups were set on the specified container for User, Contact, InetOrgPerson, or Computer type objects. For more information, see Managing Permissions on a Domain. |
RemoveLcsOuPermissions |
Removes permissions for Office Communications Server groups on the specified container for User, Contact, InetOrgPerson or Computer type objects. For more information, see Managing Permissions on a Domain. |
CreateDelegation |
Creates Read-Only, Server, User, or Setup Admins credentials on the domain. For more information, see Delegating Permissions in a Domain. |
CheckDelegation |
Checks Read-Only, Server, User, or Setup Admins credentials on the domain. For more information, see Delegating Permissions in a Domain. |
RemoveDelegation |
Removes Read-Only, Server, User, or Setup Admins credentials on the domain. For more information, see Delegating Permissions in a Domain. |
Actions for Activating Servers and Running Diagnostics
After Office Communications Server has been installed, use LCSCmd.exe server actions to activate, check, deactivate, or perform diagnostic functions on a computer or server acting in an Office Communications Server role as follows:
Action | Description |
---|---|
Activate |
Activates a computer as an Office Communications Server role. For more information, see Activating Office Communications Server. |
CheckLCServerState |
Checks a server's state and role as an Office Communications Server. For more information, see Checking the Server State. |
Deactivate |
Deactivates a server activated as an Office Communications Server role in its domain. For more information, see Deactivating Servers. |
Diag |
Runs extensive diagnostic analysis. For more information, see Running Server Diagnostics. |
You can perform these actions only after the server or servers are installed. For information about installing servers with the various Microsoft Windows® Installer (MSI) server-installation files, see Command-Line Installation of Office Communications Server.