Use PowerShell 6 for duplicacy scripts across platforms

I wasn’t aware of the fact that PowerShell is now a cross-platform open source project so I wanted to share some brief facts and thoughts here.

  • So the version that everyone has on their Windows 10 computer (a.k.a. Windows Powershell) is PowerShell 5.1.
  • The cross-plattform version (a.k.a. PowerShell Core) is PowerShell 6.0
  • Windows PowerShell will apparently not be developed further, but probably supported for a long time.
  • Powershell Core currently only supports a fraction of the commands of Windows Powershell (425 vs 2,838) but more and more commands will be added.
  • See Benefits of PowerShell 6.0.1 vs 5.1 on Windows? - Spiceworks for a more detailed comparison.

My guess is that already now, PowerShell Core probably supports everything we ever need for duplicacy scripting so it probably makes sense to try and do all our scripting in Powershell Core/ Powershell 6 because those scripts can then be used across platforms, not just on windows.

As a minimum, it would probably be good if anyone publishing a powershell script specifies whether it works on PS5.1 and/or PS6. Presumably, most PS6 scripts will work on PS5.1 and vice versa, but there are some pitfalls.

But if even the Linux and Mac folks here could start using powershell, that would probably make life easier for all of us.

2 Likes

If the main goal is cross-platform scripting, why would PowerShell be preferred over something more mature, like Python?

2 Likes

Maybe we can have some poll?:slight_smile:
My guest is that scripting in PS is a little easier and there will be more people who can do it ?

1 Like

I think it is not the case of a poll, because each one will choose a language according to his own knowledge / experience and/or coding simplicity.

The best language in the world is the one I know / master.:wink:

You right:)
What I thought is a poll to see how many people are here on forum can program in what languages :slight_smile:

Anyone can create polls via the :gear: icon in the post editor. But perhaps start a new topic for that…