You should never ngen binaries you don't own. This is just asking for corrupting your system. Furthermore when those binaries are updated by the third party next time then they won't be ngen automatically which could cause failures or bad performance. Specifically dependencies are impacted by ngen so doing this on binaries you don't own can cause them to fail to load for others.
At this point you'll need to repair the installation of the program(s) that installed the binaries. The particular one you mentioned is from Powershell so you might be able to repair the installation of it. If you have PS and PS Core then you might need to repair both. If that doesn't fix it then repair the .NET installation as well.