I completely uninstalled Visual Studio Code but this VSCode extension script getplastertemplate.ps1 keeps executing every time I open the default PowerShell console now.
After uninstalling Visual Studio Code I performed a careful manual cleanup of both the registry and the file system. However, every time I launch PowerShell.exe or PowerShell_ISE.exe, my security software is blocking getplastertemplate.ps1:
03/26/18 04:44:12 Prevented process from launching from .
This directory does not exist in the file system: c:\users\\.vscode\extensions\ms-vscode.powershell-1.6.0\modules\plaster
How can I reset PowerShell.exe to the way it was prior to installing Visual Studio Code ?
So, aside for the profile scripts, PowerShell doesn't have any way of auto-executing scripts. It might be worth searching your system for the script in question, and renaming it to something else. That way, whatever is attempting to launch it may throw an error that would be more helpful.
Don I didn't see your reply but I did just that. I found that ModuleAnalysisCache located in C:\Users\\AppData\Local\Microsoft\Windows\PowerShell was the culprit. I searched for getplastertemplate.ps1 and it was in there. As to why it was getting executed – being an empty, non-executable script – when launching the default console, I leave that explanation to you.
In any case, deleting ModuleAnalysisCache solved the problem.