Basic Administration > Managing Licenses > Windchill Licensing > License Management Utility > Retrieving License Automatically using windchill Shell
  
Retrieving License Automatically using windchill Shell
This topic contains information about how you can configure license settings and fetch license by running the following license utility command in windchill shell, instead of Windchill License Management user interface. You can fetch license using this utility only when you are connected online.
windchill wt.licenseusage.WindchillLicenseUtility
Use the following arguments to execute this utility.
Arguments
Description
-SetToOnlineMode
Switches the license settings to online mode. Use this mode if you are connected online.
-SetToOfflineMode
Switches the license settings to offline mode. Use this mode if you are offline.
-FetchLicense
Fetches license if the license setting is already set to online mode.
-SetToOnlineModeAndFetchLicense
Switches the license settings to online mode and fetches license.
-siteUsername
Site administrator user name.
-sitePassword
Site administrator password.
-ptcUsername
PTC user name.
-ptcPassword
PTC password.
Configuring License Settings
To switch the license settings to online mode, execute the following command:
windchill wt.licenseusage.WindchillLicenseUtility -SetToOnlineMode -ptcUsername <PTC username> -ptcPassword <PTC password> -siteUsername <SiteAdminUsername> -sitePassword <SiteAdminPassword>
To switch the license settings to offline mode, execute the following command:
windchill wt.licenseusage.WindchillLicenseUtility -SetToOfflineMode -siteUsername <SiteAdminUsername> -sitePassword <SiteAdminPassword>
Fetching License
Using windchill shell, you can fetch license by executing the license utility.
If your license setting is already set to online mode, execute the following command to fetch license:
windchill wt.licenseusage.WindchillLicenseUtility -FetchLicense -siteUsername <SiteAdminUsername> -sitePassword <SiteAdminPassword>
To switch from offline mode to online mode and fetch license, use the following command:
windchill wt.licenseusage.WindchillLicenseUtility -SetToOnlineModeAndFetchLicense -ptcUsername <PTC username> -ptcPassword <PTC password> -siteUsername <SiteAdminUsername> -sitePassword <SiteAdminPassword>
On successful execution, license is processed and fetched automatically. A new license information is added to the table in the License Information tab. If the execution fails, error message is displayed on windchill shell. Use --help to display usage instructions for the utility.