Overview
There is a PowerShell script Upgrade-CentreStack.ps1, that may be used to upgrade CentreStack as opposed to using the Installation GUI Tool (installEntGUI<build>.exe). There are few advantages to using the PowerShell script to upgrade CentreStack as opposed to the Installation GUI Tool:
- NEW! The script is capable of automatically downloading the latest public build.
- The script is capable of downloading the build number specified.
- The script makes a backup of the existing CentreStack binaries.
- The script extracts the CentreStack upgrade package approximately 7 times faster than the Installation GUI Tool. The Installation GUI Tool uses the Win32 Shell API to extract the .zip, while the script uses a .NET method. As of build 7161, the Installation GUI Tool use .NET methods to extract files so there is no longer a performance benefit to using this PowerShell script.
- The script's output more verbose progress than the Installation GUI Tool. The administrator will be able to see each file as it is backed up, extracted and overwritten.
Script Actions
The Upgrade-CentreStack.ps1 script will perform these actions when executed:
- Downloads the specified build or uses an existing upgrade<build>.zip package that was manually downloaded previous to running the script.
- Uses robocopy to backup the "C:\Program Files (x86)\Gladinet Cloud Enterprise" to "C:\CSBackup\Gladinet Cloud Enterprise_<build>", where <build> is the 4 digit build number of the current binaries. The robocopy log file will be saved in "C:\CSBackup\Robocopy_Backup_<COMPUTERNAME>_<build>_<date>_<time>.log"
- Extracts the download upgrade<build>.zip to the user's %TEMP%\upgrade<build>
- Stops IIS
- Stops the Gladinet Cloud Monitoring Service
- Uses robocopy to copy from %TEMP%\upgrade<build> to "C:\Program Files (x86)\Gladinet Cloud Enterprise". The robocopy log file will be saved in "C:\CSBackup\Robocopy_Upgrade_<COMPUTERNAME>_<build>_<date>_<time>.log"
- Starts IIS
- Starts the the Gladinet Cloud Monitoring Service
Script Prerequisites
- The Upgrade-CentreStack.ps1 script requires PowerShell 4 which is included in Windows Server 2012 R2 and later. To see what version of PowerShell is installed, start PowerShell and execute this command:
Get-Host
- The Upgrade-CentreStack.ps1 script requires that PowerShell be elevated ("run as Administrator").
- CentreStack Web Server must already be installed on the system.
Script Execution Process
Use the instructions to download and execute the PowerShell script:
- In a web browser, download: Upgrade-CentreStack.ps1,
- Start an elevated PowerShell session (i.e. running as Administrator)
- Make sure the system is configured to run PowerShell scripts by executing:
Set-ExecutionPolicy RemoteSigned
- Change the current directory to the directory where the Upgrade-CentreStack.ps1 is located, for instance:
cd $env:UserProfile\Downloads
- Since the script was downloaded from the Internet, it must be unblocked before it can be executed:
Unblock-File .\Upgrade-CentreStack.ps1
- To view basic command line syntax and basic comment based help execute:
.\Upgrade-CentreStack.ps1 -?
- To view full comment based help execute:
Note: The first time the script is executed you may see this prompt:Get-Help .\Upgrade-CentreStack.ps1 -Full
Do you want to run software from this untrusted publisher? File C:\Users\JeffR\Downloads\Install-Debugger.ps1 is published by CN="Gladinet, Inc.", O="Gladinet, Inc.", L=Fort Lauderdale, S=Florida, C=US and is not trusted on your system. Only run scripts from trusted publishers. [V] Never run [D] Do not run [R] Run once [A] Always run [?] Help (default is "D"):n
Enter: A
Selecting this option will always trust PowerShell scripts signed with Gladinet's code signing certificate. - NEW! It's best to run the script without any command line arguments if you would like to upgrade to the latest public build. The script will make a web request to determine the latest build and download and install it automatically. For example, execute:
.\Upgrade-CentreStack.ps1
Example Output
PS C:\Users\JeffR\Downloads> .\Upgrade-CentreStack.ps1
Downloading https://s3.amazonaws.com/gladinetsupport/GCE/upgrade7161.zip ...
Completed download in: 0:00:25.4764004
Extracting:
Source: 'C:\Users\JeffR\Downloads\upgrade7161.zip'
Destination: 'C:\Users\JeffR\AppData\Local\Temp\upgrade7161'
Please wait...
Completed extraction in: 0:00:33.1890028
Stopping IIS...
Completed IIS stop in: 0:00:07.171193
The Idle service stopped.
Stopping Gladinet Cloud Monitoring Service (GCMon)
Waiting for GladinetCloudMonitor process to stop (PID=1096)...
Waiting for GladinetCloudMonitor process to stop (PID=1096)...
Waiting for GladinetCloudMonitor process to stop (PID=1096)...
Waiting for GladinetCloudMonitor process to stop (PID=1096)...
Waiting for GladinetCloudMonitor process to stop (PID=1096)...
Waiting for GladinetCloudMonitor process to stop (PID=1096)...
Waiting for GladinetCloudMonitor process to stop (PID=1096)...
Waiting for GladinetCloudMonitor process to stop (PID=1096)...
Waiting for GladinetCloudMonitor process to stop (PID=1096)...
The service stopped.
Starting robocopy.exe:
Source: 'C:\Users\JeffR\AppData\Local\Temp\upgrade7161\build'
Destination: 'C:\Program Files (x86)\Gladinet Cloud Enterprise'
Please wait...
Completed robocopy upgrade in: 0:00:45.4581335
Starting IIS
Attempting start...
Internet services successfully started
Starting Gladinet Cloud Monitoring Service
Script completed in: 0:02:31.4796277
Backup the Current CentreStack Binaries
If the script is executed with the -Backup command line argument, the script will backup the current CentreStack installation directory (typically "C:\Program Files (x86)\Gladinet Cloud Enterprise") to "C:\CSBackup\Gladinet Cloud Enterprise_<build>", where <build> is the current build number (e.g. "6995")
For example, to backup the current system then upgrade to the lastest public build, execute:
.\Upgrade-CentreStack.ps1 -Backup
Upgrading to a Specific Public Build with Automatic Download
The script can be used with the -Build command line argument to specify a specific public build. For instance, this is actually a useful method for downgrading CentreStack to an earlier release if the latest release has a regression. For example:
.\Upgrade-CentreStack.ps1 -Build 6995
Upgrading to a Private Build
On rare occasions CentreStack support may provide a download to a private build. It's possible to download the upgrade<build>.zip, then use the script to upgrade the system. For example:
.\Upgrade-CentreStack.ps1 -ZipPath "C:\Users\JeffR\Downloads\upgrade7233.zip"
Comments
1 comment
2nd link to the script produce a 500 error.
Please sign in to leave a comment.