Visual Studio Code Uninstalled But VSCode Script Still Executing

Welcome Forums General PowerShell Q&A Visual Studio Code Uninstalled But VSCode Script Still Executing

This topic contains 6 replies, has 4 voices, and was last updated by

 
Participant
7 months, 3 weeks ago.

  • Author
    Posts
  • #97110

    Participant
    Points: 1
    Rank: Member

    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

    Participant
    Points: 56
    Rank: Member

    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

      Participant
      Points: 1
      Rank: Member

      I checked. My profile is empty.

  • #97122
    Jon

    Participant
    Points: 24
    Rank: Member

    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

      Participant
      Points: 1
      Rank: Member

      Each of the profiles are empty.

  • #97134

    Keymaster
    Points: 1,624
    Helping HandTeam Member
    Rank: Community Hero

    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

      Participant
      Points: 1
      Rank: Member

      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.

The topic ‘Visual Studio Code Uninstalled But VSCode Script Still Executing’ is closed to new replies.