How can I explicitly instruct ARS to execute scripts in PowerShell v7
- Products
- Solutions
- Resources
- Trials
- Support
- Partners
- Communities
How can I explicitly instruct ARS to execute scripts in PowerShell v7
Currently Active Roles uses Windows PowerShell for its PowerShell runtime environment. There is no way to tell it to use the newer PowerShell in its place (good feature request idea though).
With that…
I was just checking the Release Notes and interestingly, the highest version I could find in there is 5.1
I think you've answered me indirectly - there must not be a way to specify the environment to launch a script module in.
It looks like if I want to utilize things like "foreach-object -parallel" I guess…
Currently Active Roles uses Windows PowerShell for its PowerShell runtime environment. There is no way to tell it to use the newer PowerShell in its place (good feature request idea though).
With that said, you definitely can use PowerShell 6/7 to run the Active Roles Management Shell cmdlets outside of Active Roles. In fact, they actually run significantly faster when ran in a PowerShell 7 terminal. I haven’t tested every cmdlet with every parameter though so I would not be able to confidently say they will all work. I've passed this information onto some folks to see if we can get this tested to potentially list it as supported (still referring to outside the Active Roles runtime environment). I wouldn't be able to provide any sort of ETA on that as it would have to be properly reviewed and placed in the appropriate priority queue to get done.
You could try using the start-process cmdlet to launch PWSH.exe with an external script file. You won't have the amount of integration as you do with a script module but it should work. Unfortunately I'm not in a position to test it at the moment so you'd have to test that on your own.
Currently Active Roles uses Windows PowerShell for its PowerShell runtime environment. There is no way to tell it to use the newer PowerShell in its place (good feature request idea though).
With that said, you definitely can use PowerShell 6/7 to run the Active Roles Management Shell cmdlets outside of Active Roles. In fact, they actually run significantly faster when ran in a PowerShell 7 terminal. I haven’t tested every cmdlet with every parameter though so I would not be able to confidently say they will all work. I've passed this information onto some folks to see if we can get this tested to potentially list it as supported (still referring to outside the Active Roles runtime environment). I wouldn't be able to provide any sort of ETA on that as it would have to be properly reviewed and placed in the appropriate priority queue to get done.
You could try using the start-process cmdlet to launch PWSH.exe with an external script file. You won't have the amount of integration as you do with a script module but it should work. Unfortunately I'm not in a position to test it at the moment so you'd have to test that on your own.