Ok so after figuring out why the PowerShell ISE wasn’t loading the appropriate .NET Framework I added the registry key to enforce that .NET Framework v4.0 always loaded – bad idea. When you do this it means that the .NET Framework v4.0 will be loaded instead of the .NET Framework version you selected for that particular Visual Studio project. This results in a variable array of ‘could not be resolved because it has a higher version’, ‘type or namespace could not be found’, and ‘predefined type is defined in multiple assemblies in the global alias’ warnings and errors.
To get yourself back to a usable state, delete the registry keys out. Below are the commands that will let you do this from the commandline.
reg delete hklm\software\microsoft\.netframework /v OnlyUseLatestCLR reg delete hklm\software\wow6432node\microsoft\.netframework /v OnlyUseLatestCLR