r/PowerShell • u/UnBrewsual • Feb 02 '26
Solved Please fix my stupid script.
Its a simple function that moves files from one folder to another, powershell is running in Admin because I have elevated privledges later in the script.
The problem is: If I open Powershell ISE as admin, then press F5 to run, it will error saying "MoveThem: The term 'MoveThem' is not recognized as the name of a cmdlet, function, script file, or operable program.."
Just typing: MoveThem
Function MoveThem {...}
Here is the rub: After it errors, if I press F5 again, it runs without error.
Adding a pause does nothing.
Adding a While Get Command not loaded just death spirals.
View all comments
Show parent comment
-2
u/Medium-Comfortable Feb 03 '26
Or, hear me out, you make an improvement proposal. Don’t you have any of your own responsibility? That’s the most ridiculous thing I’ve ever heard and I’m working in IT since 1985 or so. Continue to function and wonder why you don’t make progress. 😂