Makers Blog

Powershell … on an AXC F 1152 ?

Martin PLCnext Team 31 July 2020 min. read
421 views 0 comments

If you can’t get enough Microsoft, and if you like using Powershell on Windows, then you might be interested to know that Powershell can also be installed on PLCnext Control devices.

Please note the warning from Microsoft that this version of Powershell is only experimental.

This demonstration is for an AXC F 1152 or 2152, but a similar procedure should work for other PLCnext Control devices.

Procedure

  • Using ssh (Linux) or PuTTY (Windows), log in to the PLC as “admin”.
  • Download the latest tar.gz file:wget https://github.com/PowerShell/PowerShell/releases/download/v7.0.3/powershell-7.0.3-linux-arm32.tar.gz
  • Unpack the tar.gz file in a directory:mkdir ~/powershell tar -xvf ./powershell-7.0.3-linux-arm32.tar.gz -C ~/powershell
  • Open the file ~/powershell/pwsh.runtimeconfig.json in a text editor.
  • Add the following to the configProperties section of the configuration file:"System.Globalization.Invariant":true(don’t forget to add a comma to the end of the previous line)My complete configuration ended up as:{ "runtimeOptions": { "tfm": "netcoreapp3.1", "includedFrameworks": [ { "name": "Microsoft.NETCore.App", "version": "3.1.6" } ], "rollForwardOnNoCandidateFx": 2, "configProperties": { "System.Runtime.TieredCompilation": true, "System.Runtime.TieredCompilation.QuickJit": true, "System.Runtime.TieredCompilation.QuickJitForLoops": true, "System.Globalization.Invariant":true } } }
  • Start Powershell~/powershell/pwsh
  • Enjoy the power of Powershell.

Reference:

Note:

The Makers Blog shows applications and user stories of community members that are not tested or reviewed by Phoenix Contact. Use them at your own risk.

Discussion

Please login/register to comment

Login/Register

Leave a Reply

Newsletter
Never miss a new article
Sign up for the newsletter
Never miss news about PLCnext Technology
Get interesting content via newsletter four times a year
Receive exclusive information before all other users