Hacker News new | ask | show | jobs
by denistaran 558 days ago
If you’re scripting on Windows, it’s better to use PowerShell instead of batch. Compared to Bash, PowerShell is also better suited for large scripts because it works with objects rather than plain text. This makes handling structured data like JSON, XML, or command outputs much easier, avoiding the need for error-prone text parsing.
1 comments

PowerShell is definitely better for new projects, but there's lots of legacy batch files out there.