Enterprise customers can restart Master or Game Servers on clusters of their private Photon Cloud. This can be done using a PowerShell script that is given to customers on request.
Required Customer Data
The customer's credentials ("CustomerName" and "Key") are required for the script to work. Also cluster names may be needed.
To better illustrate the restart process, we will use the following example values:
- Customer: "SampleCustomer"
- Key: "MyKey"
- Cluster: "MyCluster"
- Download the cloud control client zip file. Unblock the "Photon.PrivateCloud.Plugin.Control.Client.zip" file and then extract its content. For more information on how to unblock a file, please visit this link.
- Please make sure to synchronize date and time on the machine running the cloud control script. Otherwise, it might not work. For more information regarding this please visit this link.
- Open a new PowerShell window. It is recommended to start a new PowerShell session for the cloud control.
- If you have the default Windows PowerShell "Restricted" execution policy you need to change it.
We recommend to set it to "RemoteSigned" using
Set-ExecutionPolicy RemoteSigned. To get the current execution policy use
Get-ExecutionPolicy. Read more about "Running Scripts" from Microsoft TechNet.
- Import the modules needed from the script "Photon.PrivateCloud.Plugin.Control.Client.psm1" as follows:
The available commands imported in the module can be listed using:
To get help about a command just use
Get-Help with the command name available from the previous list.
Example to get help about
Use the "Restart-PhotonCloud" command to restart Photon Master or Game Servers on one or all clusters.
By default, a restart happens on all Game Servers if nothing is explicitly specified:
You can specify what servers to restart
If you have more than one cluster and want to restart servers only on a specific one you can do so by specifiying its name:
To check the status of servers restart you can use "Get-PhotonCloudRestartStatus" cmdlet: