-WhatIf
parameters. They stop the commands from actually executing. You would remove those when you are satisfied that the script will do what you want it to do.help MyScript -detail
C:Windowssystem32
would really be C:WindowsSysWOW64
. See File System Redirector. I suspect File System Redirector and/or Registry redirector play a role in the behavior.