Visual Studio Code Uninstalled But VSCode Script Still Executing

This topic contains 6 replies, has 4 voices, and was last updated by  Lockdown 1 month, 4 weeks ago.

  • Author
    Posts
  • #97110

    Lockdown
    Participant

    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 ?

  • #97118

    Alex Aymonier
    Participant

    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)

    • #97119

      Lockdown
      Participant

      I checked. My profile is empty.

  • #97122

    Jon
    Participant

    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

    • #97128

      Lockdown
      Participant

      Each of the profiles are empty.

  • #97134

    Don Jones
    Keymaster

    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.

    • #97173

      Lockdown
      Participant

      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.

You must be logged in to reply to this topic.