-
-
Notifications
You must be signed in to change notification settings - Fork 443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for PowerShell Core 7.x on Windows and Linux #1026
Comments
"I imagine" - you imagine it wrong, but having move options is a good thing in the SysAdmin arsenal Cheers, |
Totally agree with BMT. Are you sure this isn't implemented? If a powershell script is set to all it will run on linux (or at least attempt to). Have you installed powershell on a linux server and tested? |
I haven't tested but if PowerShell Core support is already implemented for Linux that's great. That would just leave Windows which is otherwise stuck on 5.x. |
Shall leave this open for you to test it and report back :) |
Since TRMM is one huge scripting engine, this is probably something you can script on your own if you want to have powershell core on all the machines you want. If you'd like to get any scripts you build for that purpose into the script library let me know and we'll get it done. I'll close in a month if no movement. |
something that might not be obvious...to use powershell on linux you'll actually need to choose "Shell" as the script type. then you will need to add a shebang as the first line of the script with the path to the powershell binary so like |
(While appreciating Linux support is still beta) that's a bit kludgy :) Why not have TRMM natively run the powershell script using /opt/microsoft/powershell/pwsh ? Then powershell scripts can all sit nicely side by side within TRMM. |
Because that's non-standard, now TRMM has to install and manage powershell core on linux, and detect OS to determine if it should be installed, and install PS Code on windows, and upgrade or repair, and regression test and and.... I'm sure most 'nix folks will not want powershell crufting up their 'nix install ;) There's a workaround that you can fully implement for now if you want pshw. I'll leave it open, but I don't see much changing unless someone wants to pickup the ball and run with it. |
having this on windows only would be nice. no need to install it just puke an error out if the users try to use it and pwsh is not recognised. |
Ok ended up doing a script to sort this out on windows: It is set as a snippet "CallPowerShell7" and if {{CallPowerShell7}} is called the start of script it will run the whole thing as PowerShell 7
|
I'd like the option within TRMM to natively run scripts using PowerShell Core 7.x on Windows and Linux endpoints.
There's some info about this here (for Windows) - https://docs.microsoft.com/en-us/powershell/scripting/whats-new/migrating-from-windows-powershell-51-to-powershell-7?view=powershell-7.2
I imagine a lot of TRMM users are far more comfortable with PowerShell than bash and suspect this might help grow the number of useful cross-platform scripts within the TRMM community.
The text was updated successfully, but these errors were encountered: