SolidCP Auto Upgrad...
 
Notifications
Clear all

SolidCP Auto Upgrade Script - PowerShell

47 Posts
13 Users
0 Reactions
15.3 K Views
Posts: 35
(@nvgoldendog)
Trusted Member
Joined: 9 years ago

I tried to import the PSS Snapin's but that failed. I read to just use Import-Module "sqlps" and that should load the modules I need. I then ran the script and got a different error:
Cannot index into a null array.
At C:SolidCP-Auto-Upgrade-ToolSolidCP-Auto-Upgrade.ps1:167 char:48
+             $SCP_UNCsvr_Name = $SCP_UNC_Test.ServerName[ <<<< $i]
+ CategoryInfo          : InvalidOperation: (0:Int32) [], RuntimeException
+ FullyQualifiedErrorId : NullArray

Cannot index into a null array.
At C:SolidCP-Auto-Upgrade-ToolSolidCP-Auto-Upgrade.ps1:168 char:48
+             $SCP_Server_Root = ($SCP_UNC_Test.ServerUrl[ <<<< $i] -replace "http://| https://|:900 3", "")
+ CategoryInfo          : InvalidOperation: (0:Int32) [], RuntimeException
+ FullyQualifiedErrorId : NullArray

Get-ChildItem : Cannot process argument because the value of argument "path" is invalid. Change the value of the "path"
argument and run the operation again.
At C:SolidCP-Auto-Upgrade-ToolSolidCP-Auto-Upgrade.ps1:170 char:59
+             foreach ($RemoteServer in (Get-ChildItem (Get-ChildItem <<<<  -Path "$SCP_Server_Rootc$" -Include ("W
ebsitePanel", "SolidCP", "DotNetPanel")).FullName)) {
+ CategoryInfo          : InvalidArgument: (:) [Get-ChildItem], PSArgumentException
+ FullyQualifiedErrorId : Argument,Microsoft.PowerShell.Commands.GetChildItemCommand

Test-Path : Cannot bind argument to parameter 'Path' because it is an empty string.
At C:SolidCP-Auto-Upgrade-ToolSolidCP-Auto-Upgrade.ps1:173 char:17
+             if (Test-Path <<<<  "$SCP_UNCsvr_Dir") {
+ CategoryInfo          : InvalidData: (:) [Test-Path], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.Test
PathCommand

Reply
1 Reply
Admin
(@m-tiggelaar)
Joined: 9 years ago

Noble Member
Posts: 1967

hmm this one i can confirm i got my self aswell earlier today on one of my customers environments. I will check it out together with Marc (who made all powershel scripts) and update you on the issue to provide a proper solution for you.

Reply
Posts: 14
(@rhyse)
Active Member
Joined: 8 years ago

Hi

I am looking to do the upgrade using the script. However the script assumes the portal is on the same server as the enterprise server. Is there a way to update the script to update the portal server if it isnt on the same server?

Thanks

Reply
1 Reply
(@datatechuk)
Joined: 9 years ago

Member
Posts: 32

Hi rhyse, I can have a look at this and i am sure i can modify the script to detect or prompt for the Portal Server location if it is not found on the Enterprise Server. I am happy to connect to your enviroment and make sure the script runs a expected once i have made the modification, but we will need remote access to your PC to be able to do this. We use TeamViewer to be able to do this, please email support@solidcp.com (include your phone number and time zone on the email) which will create a support ticket and i will contact you once i have made the changes so we can test them on your system before running the script

Reply
Posts: 14
(@rhyse)
Active Member
Joined: 8 years ago

Hi

I am also getting the following error when selecting option 3 from the menu

Invoke-SQLCmd : The database "WebsitePanel" cannot be opened. It is acting as a mirror database.
At C:WebsitePanelSolidCP-Auto-Upgrade-ToolSolidCP-Auto-Upgrade.ps1:170 char:36
+         push-location ; ($SCP_UNC_Test = Invoke-SQLCmd -query "SELECT [ServerName], [S ...
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidOperation: (:) [Invoke-Sqlcmd], SqlPowerShellSqlExecutionException
+ FullyQualifiedErrorId : SqlError,Microsoft.SqlServer.Management.PowerShell.GetScriptCommand

Thanks

Reply
1 Reply
(@datatechuk)
Joined: 9 years ago

Member
Posts: 32

Hi rhyse, The error is saying that the database you are using for your Enterprise Server is not the active Database as it is mirrored. The script is designed to be run on your enterprise server, we have added in support for the database if it is running on another server, but it will only upgrade a single database instance and not a mirrored database. I will have a look and see if we can add support in for this, but it depends on what support PowerShell has for SQL in mirrored databases.

Reply
Posts: 35
(@nvgoldendog)
Trusted Member
Joined: 9 years ago

Hi. Is there an updated PowerShell script that is working when you have your enterprise server and SQL server on different servers?

Reply
1 Reply
(@datatechuk)
Joined: 9 years ago

Member
Posts: 32

Hi NVGoldenDog, The script will currently detect if the SQL Server is on a different machine to the Enterprise Server. Please run option 3 from the script so it can check UNC access is enabled on all remote machines that form part of your SolidCP setup. Please le me know if you have any issues. Kind regards, Marc

Reply
Posts: 10
(@dormosh)
Active Member
Joined: 9 years ago

Hello,

The script does not upgrade enterprise server when the scheduler service is running as some dlls are in use. I believe this service should be stopped by the script before attempting upgrade.

Reply
Page 5 / 7
Share: