I’ve used it here and there throughout the years for small tasks and didn’t think much of it. The last 2 weeks, I’ve been using it more cause I have to do some work on a Windows VM and it’s nice! I’ll go back to bash after I’m done with this work cause that’s what everyone uses. I wouldn’t mind the switch though.
I know bash is the standard but does anyone opt for powershell even on a Linux vm?
I recently was looking at doing some backup software in Powershell for Windows 10 and 11. My chosen method was to use a VHDX file (Windows backup does this). Now in powershell there are commands to create a VHD or VHDX file but they are tied to the Hyper-V package in Windows being installed. In Windows 11 this package has been totally removed and can no longer be downloaded or installed.
So next I tried to find another way to use VHDX files in Windows 11 from Powershell. So I discovered that the diskpart command line utility can create/attach/partition etc VHDX files. Diskpart however is not integrated into powershell. In order to use it you need to create a text file with the commands to run. Execute diskpart with that text file. Then you have to search the text output for the results.
At this point I felt like I should have been using a Unix shell anyway.