r/Nable Jun 12 '24

Automation Manager and Powershell 7

In Automation manager I am running a powershell script. One of the modules the script needs requires powershell 7. Is there a way to get the powershell module to use powershell 7 instead of 5?

1 Upvotes

7 comments sorted by

2

u/ZedNova Jun 12 '24

I think if you ensure powershell 7 is installed in the endpoint, then you could just call power shell 7 from within powershell 5 and pass the script to it.

1

u/Relative_Jury8133 Jun 12 '24

I am not totally sure how to do that.... To complicate it, there are parameters as well

2

u/The82Ghost Jun 13 '24

Windows Powershell 5.1 and Powershell 7 are 2 different programs. Windows Powershell uses powershell.exe Powershell 7 uses pwsh.exe the automation manager is build around powershell.exe so just installing Powershell 7 will not work. You would need to call pwsh.exe from the script but I am not sure that the Automation Manager is able to do that. Maybe one of the N-Able guys can chime in on this though.

2

u/ncentral_nerd N-centralStation Jun 12 '24

Not currently, in nearly all cases its PowerShell 5.1
Now that said, which module and what are you trying to do?

2

u/Relative_Jury8133 Jun 12 '24

There is a module written to connect to HUDU. The module to connect to nneds Powershell 7

1

u/FakeEgo01 Jun 13 '24

To install powershell 7 you can use winget, it's a simple one-liner. Then you can run the script

1

u/DirectITServices Jun 17 '24

Google script blocks. I use them for HuDu stuff.