Background
Sage Estimating may utilize an 'Entitlement' License file (EntitlementInfo.xml) when present in a user's profile (AppData). This specially crafted, contents-encrypted .xml file will trigger Sage Estimating to utilize this license file, instead of an on-premise Sage License Server Service. The following PowerShell script may be deployed, along with the source folders and files, to streamline the deployment process. The result is that each user, upon logging in, will receive the required file.
Prerequisites
- Administrator rights at the Workstation or Session Host(s)
- The right to change the local group policies
- An Entitlement License file [provided by Sage software]
Steps
Create a PowerShell script and place the source files
PowerShell script
- Create a PowerShell script with the following (or similar).
Note: If you are uncomfortable with writing, reading, or editing PowerShell scripts, please consult your IT department.
Note: Update the following as required for your deployment: the path to the source folder and file.# Users profile path to Sage Estimating <current_version> $Path_Roaming_Folder = "$env:userprofile\AppData\Roaming\Sage\Estimating <current_version>" # Path to source folder $SourceFolder = "C:\users\default\AppData\Roaming\Sage\Estimating <current_version>" # Folder to create if it does not exist $MD_Sage_Folder = "$env:userprofile\AppData\Roaming\Sage\Estimating <current_version>" # Users profile path to Sage Estimating <current_version> EntitlementInfo.xml file $XMLPath_Roaming_Folder = "$env:userprofile\AppData\Roaming\Sage\Estimating <current_version>\EntitlementInfo.xml" # Path to source file $XMLSourceFile = "C:\users\default\AppData\Roaming\Sage\Estimating <current_version>\EntitlementInfo.xml" # Path to target folder $XMLMD_Sage_Folder = "$env:userprofile\AppData\Roaming\Sage\Estimating <current_version>" # ACTION if (-not ` # Test to see if the target path exists (test-path -Path $Path_Roaming_Folder)) ` # if the Source Folder does not exist, then create the folder {copy-item $SourceFolder $MD_Sage_Folder -Recurse} # Copy the EntitlementInfo.xml to the users profile copy-item $XMLSourceFile $XMLMD_Sage_Folder -Recurse
- Save the script as SageConfigProfile.ps1 (or a similar name) for use later in this solution.
Source Files
Copy the Sage-provided EntitlmentInfo.xml file.
Source Folders
- Create the following folders as defined in the # Path to source folder location in the logon script.
example:
"C:\users\default\AppData\Roaming\Sage\Estimating <current_version>" - Copy the EntitlementInfo.xml file and place it in the source folder (I.e., Estimating 20.1 or <current_version>).
Add a local Group Policy Logon script
- Log on to the Workstation or Session Host(s) with Administrative rights.
- Open the local machine Group Policy editor (Start > type "edit group policy"... and select "Edit group policy")
- Expand Windows Settings under User Configuration...
- In the right pane, double-click Logon...
- Select the PowerShell Scripts tab...
- Select the Show Files... button...
- In the Logon folder (%WINDIR%\System32\GroupPolicy\User\Scripts\Logon...), add the previously created PowerShell script SageConfigProfile.ps1.
- At the Logon Properties window, click the Add button...
- At the Add a Script window, click the Browse button...
- At the Browse window, select the previously placed Powershell script and click the Open button...
- At the Add a Script window, click the OK button...
- At the Logon Properties window, click the Apply and then OK buttons...
- At the Local Group Policy window, click the 'X' to close the window...
Test the PowerShell script- Check for the presence of a "Sage" folder in the [Root]:\Users > Username > AppData > Roaming folder...
- Run the PowerShell script...
- There should now be a "Sage" folder with a subfolder "Estimating 20.1 or <current_version_number>" and a file within it called "EntitlementInfo.xml"...
- Check for the presence of a "Sage" folder in the [Root]:\Users > Username > AppData > Roaming folder...