Today, we experienced very strange behavior with PowerShell Universal. When executing a script with parameters, we noticed that it no longer recognized the cmdlets. Shortly thereafter, all scripts were in a state as if a new script had been created with just a name. All content was missing. All PowerShell files in ProgramData were essentially emptied. Has anyone here already had experience with how something like this can happen?
This happened to me yesterday, was also running 5.4.1. All my scripts disappeared without a trace, including the entirety of the Repository folder. Luckily I was able to restore the backup of the scripts, but after updating PSU to the latest version and verifying the scripts are in the correct place and have the correct contents, PSU is still reporting all scripts have the following contents: # Script contents
Still trying to figure out how to get PSU to rescan the local PowerShell files and grab the contents
It should rescan the files every time it starts up. You can also force a rescan by navigating to Settings \ Files and clicking the sync drop down. While you are in files, I would recommend checking to see what is in scripts.ps1 to ensure the files are listed as expected.