Has anyone seen this before?
Whenever my scripts call Get-Content, my windows 10 machine opens notepad instead of processing the script. If I call Import-CSV, the environment tries to open Excel.
example:
$mycontent = Get-Content .\mytextfile.txt
or
$mycontent = Import-CSV .\mycsvfile.csv
When run from a script these open the apps instead of processing. This doesn’t happen when I enter the commands directly at the command line, but only when I try to run a script containing the commands, even if the script is launched from the command line.
The behavior just started last week, on this machine.
I’m running PowerShell ISE, PowerShell 5.1 (and 7.x) on Windows 10.
Thanks