I figured it out yesterday afternoon, i'm just an idiot.
It's an old habit that I name my files .txt while they're in testing, so I know it's something I'm working on. ISE lets me still F8 these and run sections to test. It's an old habit that has carried over from just pushing out .bat and .cmd files in notepad and saving them as .txt first. Then downloading .ps1 files off the internet and saving them as .txt first so I dont accidentally run them.
VScode does not treat the .txt files the same.
I switched over to an old script and it ran just fine. Then I realized the intellisense colors and formatting were all there, then i realized it's the file format of .ps1 vs .txt
2
u/jhulbe Apr 17 '18
I figured it out yesterday afternoon, i'm just an idiot.
It's an old habit that I name my files .txt while they're in testing, so I know it's something I'm working on. ISE lets me still F8 these and run sections to test. It's an old habit that has carried over from just pushing out .bat and .cmd files in notepad and saving them as .txt first. Then downloading .ps1 files off the internet and saving them as .txt first so I dont accidentally run them.
VScode does not treat the .txt files the same.
I switched over to an old script and it ran just fine. Then I realized the intellisense colors and formatting were all there, then i realized it's the file format of .ps1 vs .txt
Thanks for the help. Guess this habit dies now.