mirror of
https://github.com/amidaware/tacticalrmm.git
synced 2026-04-26 06:55:52 +03:00
[GH-ISSUE #1026] Add support for PowerShell Core 7.x on Windows and Linux #630
Labels
No labels
In Process
bug
bug
dev-triage
documentation
duplicate
enhancement
fixed
good first issue
help wanted
integration
invalid
pull-request
question
requires agent update
security
ui tweak
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tacticalrmm#630
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @djsvi on GitHub (Mar 27, 2022).
Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/1026
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.
@BMTTeam commented on GitHub (Mar 27, 2022):
"I imagine" - you imagine it wrong, but having move options is a good thing in the SysAdmin arsenal
Cheers,
-Tiho
@dinger1986 commented on GitHub (Mar 27, 2022):
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?
@djsvi commented on GitHub (Mar 28, 2022):
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.
@dinger1986 commented on GitHub (Mar 28, 2022):
Shall leave this open for you to test it and report back :)
@silversword411 commented on GitHub (Mar 28, 2022):
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.
@wh1te909 commented on GitHub (Mar 28, 2022):
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
#!/usr/bin/env/powershellor wherever it is installed on your system@djsvi commented on GitHub (Mar 29, 2022):
(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.
@silversword411 commented on GitHub (Mar 29, 2022):
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.
@P6g9YHK6 commented on GitHub (Mar 11, 2024):
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.
@P6g9YHK6 commented on GitHub (Mar 12, 2024):
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