Don’t copy and paste the same code over and over again. Instead, create a PowerShell function and save yourself time.
Automator's great for streamlining time consuming and repetitive tasks on your Mac. It's easy. Just launch it, find a few actions, and string them together to form a workflow. Then, run your workflow ...