Just FYI, just like you can create command prompt scripts in batch files, that are simply text files that have the extension .bat, you can do the same for PowerShell commands. The extension for a PowerShell batch file is .ps1
If you activate either a .bat or .ps1 file, it will run. So if you use these extensions, and want to edit the file later, you must gain focus on it, bring up the context menu, and choose Edit from it.
I've seen people (including myself) get burned by double-clicking/activating .bat or .ps1 files because doing either of those things for most other file extensions will open the editor for same. Not so for these two.
Brian - Windows 10 Pro, 64-Bit, Version 20H2, Build 19042
The depths of denial one can be pushed to by outside forces of disapproval can make you not even recognize yourself to yourself.
~ Brian Vogel