xRadeon Posted March 5, 2023 Posted March 5, 2023 Greetings, I've authored a plugin to install Microsoft PowerShell. The plugin is found here: https://github.com/x-radeon/unraid-powershell Please note I'm not experienced with writing plugins for Unraid, so install at your own risk. I use the plugin on two of my Unraid installs to manage my BTRFS snapshots with no issues, so I know it works. If you know how to write plugins, please help improve it! Steps to install: On your Unraid install go to Plugins > Install Plugin For the URL, paste in https://raw.githubusercontent.com/x-radeon/unraid-powershell/main/PowerShell.plg Click Install To use PowerShell after install, type pwsh at a terminal or call pwsh in a bash script (when using 'User Scripts" for example) like so: #!/bin/bash pwsh /boot/config/plugins/myscripts/script.ps1 -xRadeon 4 Quote
Esteban4u Posted November 16, 2023 Posted November 16, 2023 (edited) Is it possible to have a Docker container access pwsh.exe ?, I've installed the plugin but I can't find the directory in the file system where pwsh.exe is Edited November 16, 2023 by Mephisto76 Quote
xRadeon Posted November 16, 2023 Author Posted November 16, 2023 When installing the plugin untars the files to this directory "/opt/microsoft/powershell/7/". The pwsh binary file is inside that directory and it's not an "exe" file, it's a native Linux binary file that's named just 'pwsh'. As for docker, I guess what you could do is map "/opt/microsoft/powershell/7/" to some path in the container and then you should be able to call pwsh from that path. I don't know if it would work. Some dockers are very cut down so I'm not sure if pwsh will have access to everything it needs to run properly, but I'm not an expert or anything so maybe it will work just fine, idk. Good luck! Quote
xRadeon Posted February 18 Author Posted February 18 Yes, it will re-install after a reboot by using the already downloaded gz file. Quote
viper1190 Posted September 4 Posted September 4 On 2/18/2024 at 2:29 PM, xRadeon said: Yes, it will re-install after a reboot by using the already downloaded gz file. What about any of the modules installed (for example AZ). Are they also retained post reboot? Quote
xRadeon Posted September 4 Author Posted September 4 No, most likely not. It's installed into the ram drive, so on a reboot it has to be re-installed. Could potentially use the User Scripts plugin to auto install your module(s) on a reboot. 1 Quote
viper1190 Posted September 4 Posted September 4 10 minutes ago, xRadeon said: No, most likely not. It's installed into the ram drive, so on a reboot it has to be re-installed. Could potentially use the User Scripts plugin to auto install your module(s) on a reboot. alright, thanks for clarifying. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.