Portability and Consistency
Installing **pwsh (PowerShell Core)** in `/usr/bin/pwsh` offers a major advantage: portability. PowerShell runs on **Windows, Linux, and macOS**, ensuring that your scripts execute consistently across different systems. By comparison, **bash** remains powerful but is closely tied to the Unix/Linux ecosystem, which limits its direct use on Windows. Therefore, to automate tasks with tools like **ffmpeg** or **ImageMagick**, your PowerShell scripts can be used without modification across multiple environments.
Richness of the PowerShell Ecosystem
PowerShell goes beyond the role of a simple shell: it is an **object-oriented language**. This approach facilitates the management of complex data (JSON, XML, CSV) and integration with **modern APIs**. For example, automating **Selenium** for testing websites or using **yt_dlp** to download videos becomes simpler thanks to existing cmdlets and modules. Conversely, bash relies on text strings and external utilities, making some operations more cumbersome and less readable. PowerShell therefore offers a richer and more structured environment for advanced tasks.
Modern and versatile automation
With PowerShell, it's possible to combine **classic tools** (such as text parsing or random list generation) with **modern libraries**, while maintaining a clear and consistent syntax. This allows you to build powerful pipelines capable of automating complex workflows, ranging from multimedia processing to system administration. Bash remains ideal for quick and minimalist scripts, but PowerShell stands out for its ability to scale to more ambitious projects, where code **readability** and **maintainability** become essential.