You want to rewrite an old batch file (.bat) into PowerShell. If you ask an AI, it will generate a plausible script in a few minutes. However, after rewriting, it often happens that "it runs, but the ...
I've always been the batch file guy wherever I go. I had a .bat script for almost every situation: cleaning a folder, temporarily zipping files, and quick server checks. I could do so much with .bat ...