microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.88k stars 29.52k forks source link

PowerShell ext and VMware.PowerCLI vis mount name is already in use #35486

Closed agowa closed 7 years ago

agowa commented 7 years ago

Details

Extensions

Extension Author (truncated) Version
vscode-eslint dba 1.3.2
ansible-vault dho 0.0.9
python don 0.7.0
ansible haa 0.2.5
terraform mau 0.0.18
PowerShell ms- 1.4.3
vim vsc 0.10.1
jinja who 0.0.8

Steps to Reproduce

  1. Open Visual Studio Code
  2. Install PowerShell Extension
  3. Open any .ps1 file
  4. Run the following commands within the integrated console:
    Install-Module "VMware.PowerCLI"
    Import-Module "VMware.PowerCLI"

    Exception

    import-module : The specified mount name 'vis' is already in use.
    At line:1 char:1
    + import-module vmware.powercli
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Import-Module], DriveException
    + FullyQualifiedErrorId : NewDriveProviderException,Microsoft.PowerShell.Commands.ImportModuleCommand

    But if i run get-psprovider | Select-Object -ExpandProperty Drives it's not listed. Also running it from the normal console within Visual Studio Code, PowerShell or PowerShell ISE works whithout this problem.

Reproduces without extensions: No (Problem with PowerShell Extension "ms-vscode.powershell")

Tyriar commented 7 years ago

Please file this against the PS extension https://github.com/PowerShell/vscode-powershell