Author Posts

March 26, 2018 at 8:51 am

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 ?

March 26, 2018 at 11:00 am

Sounds like it's in your PowerShell profile script. Take a look in your docs/PowerShell and there should be a profile.ps1 (This is from the top of my head btw)

March 26, 2018 at 11:03 am

I checked. My profile is empty.

March 26, 2018 at 11:50 am

I know you said you checked your powershell profile, but there are several. If you have looked at those, my apologies. If not, I think it's worth a look:

Powershell profiles

March 26, 2018 at 12:17 pm

Each of the profiles are empty.

March 26, 2018 at 1:28 pm

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.

March 26, 2018 at 6:13 pm

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.