Scripts to rename a PlugnCast domain
SUMMARY
The script allows to rename a PlugnCast domain with the PowerShell
Windows tool
2019-09-04
renameDomain.ps1 V1.10.10 Download
BUG FIX, NEW FEATURES, MINOR UPDATES
- Initial version
COMPATIBILITY
- PlugnCast 3.10.51 (or above)
- MS-Windows Server 2008, MS-Windows Server 2012, MS-Windows 10
Powershell
scripts execution need to be authorized on the MS-Windows
INFORMATION
STEP 1 : CONFIGURE ALL YOUR DEVICES WITH THE NEW FRONTAL URL
Given that the frontal server URL owns the old domain name, the devices must change first their configuration.
If you have only few devices:
- Access to the Web UI of all your devices,
- Change for all of them the server configuration. For example, if the old device configuration was the domain
domain1
, this is the NEW device configuration with the domaindomain2
:Configuration > App > Pull WebDAV
:- Url: http://
: /.frontals/.webdav/domain2/ - Username: login2
- Password: password2
- the option
Use this URL for status server and softwares and configurations server
is checked by default. If it is not in your case, please contact support@innes.pro to know the appropriate procedure.
- Url: http://
If you have a consequent amount of devices, change the server device configuration by executing a configuration script, which has to be named: configuration.js
.
- Change the frontal URL name in the configuration script:
- Download the latest configuration script Link to latest configuration script,
- Rename it into
configuration.js
and open it, - Uncomment the 4 lines like explained below and fill CAREFULLY the URL, the username and the password. In case the device are taking a bad configuration, it will be hard to recover it !!
// ---- Configuring pull Webdav: uncomment the 4 lines below
disablePlugnCastG2();
setPlugnCastG3("http://<server_id_addr>:<port>/.frontals/.webdav/domain2/", 1, "login2", "password2");
setStatusServer("http://<server_id_addr>:<port>/.frontals/.webdav/domain2/.device-status/", 1, "login2", "password2");
setAddonServer("http://<server_id_addr>:<port>/.frontals/.webdav/domain2/.setup/", 1, "login2", "password2");
- Connect the PlugnCast:
- Import the
configuration.js
script in theSettings > Middleware ans scripts > Configuration scripts
screen, - Select the appropriate devices which have to take the configuration script
- Send the
configuration.js
to the selected device with the buttonTargets > System > Deploy the configuration script
- Import the
- Wait for the devices installing the configuration script:
- A message Complete installation, rebooting is display for a while on the monitro connected to the device.
- Check on some device samples that the new PlugnCast frontal URL has been taken properly.
STEP 2: BACKUP
- Stop the PlugnCast server with the
Stop
PlugnCast icon, Connect to PlugnCast:
- note all the variables associated to your devices (these information will be lost after the domain renaming).
- note all the playouts name affected to your devices (these information will be lost after the domain renaming).
- note all the players label names registered on your domain (these information will be lost after the domain renaming).
Optional (but highly recommended):
- For security in case issue with the domain renaming, make a backup of all your domain repository.
- Warning: the domain repository size is quite huge.
- Directory to save (default directory name):
C:\Users\Public\Public documents\Innes Plugncast Server
- For security in case issue with the domain renaming, make a backup of all your domain repository.
STEP 3: DOMAIN RENAMING (renameDomain.ps1)
- Stop the PlugnCast server with the
Stop
PlugnCast icon, - Download the archive
renameDomain.zip
, uncompress the archive containing therenameDomain.ps1
renaming script, and copy it on a local directory (for example C:\temp) of the computer on which PlugnCast Server is installed, - Open
PowerShell
software (native software in MS-Windows 10). Ensure that the user is authorized to executePowerShell
on his computer. Administrator rights may be required as well.- Go on the local directory (ex : C:\temp ) and execute the command:
.\renameDomain.ps1 ARG1 ARG2 ARG3
- With :
- ARG1 : 'PlugnCast data path' (defaut pathname at installation 'C:\Users\Public\Documents\Innes Plugncast Server')
- ARG2 : 'domain name before renaming'
- ARG3 : 'domain name after renaming'
- For example :
- With :
.\renameDomain.ps1 'C:\Users\Public\Documents\Innes Plugncast Server' 'domain1' 'domain2'
The domain renaming is completed. Restart the PlugnCast Server with the icon PlugnCast Start
.
STEP 4: VARIABLE AFFECTATION, PLAYOUT AFFECTATION, DEVICE REGISTERING
After the domain renaming:
- Your devices are only detected by not registered,
- No variable are affected to the devices and
- The last playout is not affected to the devices
Connect to the PlugnCast Web UI:
- Select the new domain renamed (for example
domain2
), - Register back your devices,
- Affect back a playout to all your devices and
- Affect back your variables value to all your devices.
AUTHORIZE THE EXECUTION OF POWERSHELL SCRIPTS WHICH ARE NOT SIGNED
By default, your OS may not authorize to execute this Powershell script, because it is not signed. In this case, a Powershell error is returned:
PS > C:\temp\<script>.ps1
Impossible de load the file C:\temp\<script>.ps1.
C:\temp\<script>.ps1. is not digitally signed. You cannot execute the script on the current system. For further information on the script execution and the execution strategy definition, refer to the chapter about_Execution_Policies to the URL:
- https://go.microsoft.com/fwlink/?LinkID=135170.
+ CategoryInfo : Security error: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnauthorizedAccess
To work around, contact your system administrator to help you to authorize such not signed Powershell scripts.