backup scripts that have to be backwards compatible
shortcuts
PowerShell:
data processing scripts (where advanced filters/pipes are required)
non-trivial build scripts
PowerShell can be a bit hard to get used to (especially if you've done some Linux shell scripting before). One thing I personally like about PowerShell is that it attempts to keep things consistent (all from naming conventions to parameters and output formatting) and at some point you can start guessing command names.
DOS Batch files are easier to grasp but you often need weird hacks to get things working when you move on from most trivial scripting. Apart from that, they are in process of being replaced (but as it currently seems, batch files aren't going anywhere anytime soon).
From humble beginnings at an MSP, I've adventured through life as a sysadmin, into an engineer, and finally landed as a developer focused on fixing problems with automation.
Can I answer neither? I use the bash that is installed with git. Still on Windows 10, but since I'm used to bash this seemed like the more sensible option.
Top comments (5)
DOS (actually "Batch files" as they're called):
PowerShell:
PowerShell can be a bit hard to get used to (especially if you've done some Linux shell scripting before). One thing I personally like about PowerShell is that it attempts to keep things consistent (all from naming conventions to parameters and output formatting) and at some point you can start guessing command names.
DOS Batch files are easier to grasp but you often need weird hacks to get things working when you move on from most trivial scripting. Apart from that, they are in process of being replaced (but as it currently seems, batch files aren't going anywhere anytime soon).
DOS hasn't been around since the 90s..
Can I answer neither? I use the bash that is installed with git. Still on Windows 10, but since I'm used to bash this seemed like the more sensible option.
Definitely bash ;0)
I personally use power shell