This month’s topic will be on our new Runtime Component. The latest Runtime posted with our Patch 32 update has a little “gotcha” in it. If you’re not paying attention, it’s very easy to miss (like I did). The “gotcha” is a PowerShell addition. This is the first Runtime (aka RT) to require PowerShell; it’s also going to be the new requirement going forward for all future RT versions. So, you all might as well learn how it works now. If you are not familiar with how PowerShell works, this may be difficult to follow (not gonna lie), but if you’re an avid PowerShell user, it will probably be pretty simple. You may even have the prerequisites already installed.
So, let's get down to it…
First, we need to look at the requirements for RT. The First one is PowerShell, which I mentioned already. This is specifically PowerShell 7.2 or higher. Not just PowerShell 7.2+, but also SQL Server PowerShell Module as well. Confused yet?...
It will make sense when I put it all together.
Second requirement for RT is ADXAdmin component. ADXAdmin and RT go hand-in-hand. If you update one, you 99% of the time will update the other one. ADXAdmin always goes first. If you want to learn more, you can visit our Sage University site and pickup on some training videos on components. For the sake of the RT and this blog, it’s just going to appear for me on my machine.
After those two (or three, depending on how you read it) are installed, then we can install RT.
I will be demonstrating with a test server of mine; I would highly suggest doing the same.
Now, what you’re going to look for, in terms of downloads, are as follows.
- Download Sage X3 Adxadmin 95.2.85: KBID# 117713
- Download Sage X3 Runtime 95.2.85; KBID# 117716
- Installer for PowerShell from Microsoft site HERE
- Installer Commands for PowerShell for MS SQL Server HERE
We are going to follow the set of instructions below to install PowerShell for Microsoft SQL Server on the SQL Server you are using. If it’s an all-in-one machine (like my demo machine is), you can just run this one time. Initially you would do the same on the RT server as well if SQL and RT were on separate machines. This also goes for when your running multiple RT components.
- Install the MSI package HERE
- Open an MS-DOS command prompt with administrator rights.
- Enter Pwsh.exe to execute the PowerShell installation wizard.
- Enter $PSVersionTable to check that you are in version 7.2 or higher.
- Enter Install-Module -Name SqlServer -Scope AllUsers -force to install the Microsoft SQL Server PowerShell module.
- Enter Get-InstalledModule -Name SqlServer to make sure that the installation went well.
So, starting with Step One (1). Installing PowerShell (aka PS). You can get the MSI file several different ways. Easiest is to just use the embedded link in step one above. If for some reason mine breaks, you can always download free from Microsoft. Just make sure its 64bit and its 7.2 or higher. The specific one from the link above is PowerShell-7.2.3-win-x64.msi.
Step Two (2) you want to launch CMD as administrator. If you’re on any sort of newer MS OS then you can right click on the windows start icon and get a command menu. Select Command Prompt (Admin) from the menu. This will auto launch CMD as Admin.
You know you have the right CMD when the popup window title says Administrator Command Prompt
Step three (3) change directory to the location where you downloaded the update for PS
In my case it was in downloads: C:\Users\x3admin\Downloads
Tip: you can run dir to see what is in the directory to know if you’re in the right folder
The you just type (or c/p) PowerShell-7.2.3-win-x64.msi and hit enter.
It will start the installer to update PS 7.2.3
Then you click Next until you get to this spot “Optional Action”
I just check them all because I am lazy, but you may need “Enable PowerShell remoting” checked if installing Multiple Runtimes and/or on separate servers.
Then Next a few more times (taking any defaults set) and then click install
On step four (4) go to start and search for PS. Make sure to right click and run as administrator.
If it's right, it will look like mine.
Next type in (or c/p) $PSVersionTable to make sure we have actually installed the correct version.
As you can see mine says PSVersion is 7.2.3, which is good enough for our setup.
For Step five (5) we are going to run the following command in PS.
Install-Module -Name SqlServer -Scope AllUsers -force
This will install the SQL Server aspect of the required PS. It will look like this
Then you will see flashes of the download/installation as its pretty small, goes fast, and you get no completion message. You pretty much have to hope for the best and that it installed.
I had to run it several times to catch a screenshot of it.
Now we can move onto Step six (6) and check to make sure we even installed it.
This is how you check: in the same PS window type the following:
Get-InstalledModule -Name SqlServer
If you get a return like so, then it was successful
Now we are finally ready to install ADXAdmin and Runtime (RT). I am not actually going to show how ADXAdmin is updated as it's really super easy. It’s just clicking a bunch of Oks and Nexts. One thing to note, however, when updating ADXAdmin you have to update them all. If you have an all-in-one machine like mine, then its just once. You can always check “Programs and Features” in Windows if you want to see what version you have installed.
Now, we can install RT. Launch the installer and accept the language you want.
When you get to Step 2, this is where you see the “read the following” part. This is where it talks about PS and it needing to be on 7.2.X
If you want to read more about the PS requirement, you can click on the “prerequisites documentation” link and it will take you to the Technical Help site. You then would have to click on the Prerequisites overview link to get the online documentation.
Anyways, check the “I read” checkbox to continue.
When you click enough nexts to get to step 5, you will want to make sure you click modify and select the currently installed RT. We do not want to install new.
Then click next until the installation starts.
Note: if you see this error message, it means that someone is connected to the system and using RT (or batch server is running).
You will have to locate who’s in and remove them (or sill the session in task manager: Hint: it’s usually labeled adonix.exe)
The last step before the install finishes is the ODBC updates.
After step 11 is finished then you should get the done option to finish the installation.
RT install is now done.
But wait… There is one last, last, thing to do. We have to configure the RT update in the Management Console.
If you are unaware of what that is, look through my other blog posts and I have a couple on Management console.
Go ahead and launch/login to the Management Console. Once you’re in, navigate to Solutions, Runtimes.
If everything went well, the RT record should be an orange-yellowish highlighted color (like above).
Click on it to load the record
Here, we have to add a little. We need to put in the Pwsh.exe location. If you double click on the row for pwsh.exe, the system will give you a popup to where it will try to auto detect the install directory for you. It makes it easier for us.
If the console accepts the location, it will then highlight the line blue. At this point you can now click on the Configuration button to save and configure the RT update.
If you get a confirm update popup, click yes
Next you should get a popup that says Update Scripts on it. It will ask you to update Runtimes execution scripts.
You will want to click Execute update scripts button.
If all goes as planned, then you should get a successful message. Click the closed button to continue onto the rest of the auto configuration of the RT.
Once the auto configuration is complete, you can click the close button on that.
Finally, we are done.
The orange-yellow highlight should now be gone.
And we are finished.
Whew that was long. Anyways, now you know how to update to the new RT.
Until next time,