powerclicore
powerclicore copied to clipboard
Error within VS Code Integrated Console
VMware.PowerCli is unable to map the PSDrives if powershell is ran within the integrated console of visual studio code. Debug Trace:
PS /home/user> Import-Module vmware.powercli
DEBUG: 1+ >>>> Import-Module vmware.powercli
DEBUG: ! CALL function '<ScriptBlock>'
DEBUG: 7+ >>>> @{
DEBUG: ! CALL function '<ScriptBlock>' (defined in file '/home/user/.local/share/powershell/Modules/VMware.PowerCLI/12.0.0.15947286/VMware.PowerCLI.psd1')
DEBUG: 50+ >>>> @{"ModuleName"="VMware.VimAutomation.Sdk";"ModuleVersion"="12.0.0.15939651"}
DEBUG: 51+ >>>> @{"ModuleName"="VMware.VimAutomation.Common";"ModuleVersion"="12.0.0.15939652"}
DEBUG: 52+ >>>> @{"ModuleName"="VMware.Vim";"ModuleVersion"="7.0.0.15939650"}
DEBUG: 53+ >>>> @{"ModuleName"="VMware.VimAutomation.Core";"ModuleVersion"="12.0.0.15939655"}
DEBUG: 54+ >>>> @{"ModuleName"="VMware.VimAutomation.Srm";"ModuleVersion"="11.5.0.14899557"}
DEBUG: 55+ >>>> @{"ModuleName"="VMware.VimAutomation.License";"ModuleVersion"="12.0.0.15939670"}
DEBUG: 56+ >>>> @{"ModuleName"="VMware.VimAutomation.Vds";"ModuleVersion"="12.0.0.15940185"}
DEBUG: 57+ >>>> @{"ModuleName"="VMware.CloudServices";"ModuleVersion"="12.0.0.15947289"}
DEBUG: 58+ >>>> @{"ModuleName"="VMware.VimAutomation.Vmc";"ModuleVersion"="12.0.0.15947287"}
DEBUG: 59+ >>>> @{"ModuleName"="VMware.VimAutomation.Nsxt";"ModuleVersion"="12.0.0.15939671"}
DEBUG: 60+ >>>> @{"ModuleName"="VMware.VimAutomation.vROps";"ModuleVersion"="12.0.0.15940184"}
DEBUG: 61+ >>>> @{"ModuleName"="VMware.VimAutomation.Cis.Core";"ModuleVersion"="12.0.0.15939657"}
DEBUG: 62+ >>>> @{"ModuleName"="VMware.VimAutomation.HorizonView";"ModuleVersion"="7.12.0.15718406"}
DEBUG: 63+ >>>> @{"ModuleName"="VMware.VimAutomation.Cloud";"ModuleVersion"="12.0.0.15940183"}
DEBUG: 64+ >>>> @{"ModuleName"="VMware.DeployAutomation";"ModuleVersion"="7.0.0.15902843"}
DEBUG: 65+ >>>> @{"ModuleName"="VMware.ImageBuilder";"ModuleVersion"="7.0.0.15902843"}
DEBUG: 66+ >>>> @{"ModuleName"="VMware.VimAutomation.Storage";"ModuleVersion"="12.0.0.15939648"}
DEBUG: 67+ >>>> @{"ModuleName"="VMware.VimAutomation.StorageUtility";"ModuleVersion"="1.3.0.0"}
DEBUG: 68+ >>>> @{"ModuleName"="VMware.VumAutomation";"ModuleVersion"="6.5.1.7862888"}
DEBUG: 69+ >>>> @{"ModuleName"="VMware.VimAutomation.Security";"ModuleVersion"="12.0.0.15939672"}
DEBUG: 70+ >>>> @{"ModuleName"="VMware.VimAutomation.Hcx";"ModuleVersion"="12.0.0.15939647"}
DEBUG: 71+ >>>> @{"ModuleName"="VMware.VimAutomation.WorkloadManagement";"ModuleVersion"="12.0.0.15947288"}
DEBUG: 5+ function Get-ConciseViewPositionMessage >>>> {
DEBUG: ! CALL function 'Get-ConciseViewPositionMessage'
DEBUG: 7+ >>>> $resetColor = ''
DEBUG: ! SET $resetColor = ''.
DEBUG: 8+ if ( >>>> $Host.UI.SupportsVirtualTerminal -and !(Test-Path env:__SuppressAnsiEscapeSequences)) {
DEBUG: 9+ >>>> $resetColor = [System.Management.Automation.VTUtility]::GetEscapeSequence(
DEBUG: ! SET $resetColor = ''.
DEBUG: 46+ >>>> $errorColor = ''
DEBUG: ! SET $errorColor = ''.
DEBUG: 47+ >>>> $accentColor = ''
DEBUG: ! SET $accentColor = ''.
DEBUG: 49+ if ( >>>> $null -ne $Host.PrivateData) {
DEBUG: 50+ >>>> $errorColor = Get-VT100Color $Host.PrivateData.ErrorForegroundColor
DEBUG: 14+ function Get-VT100Color([ConsoleColor] $color) >>>> {
DEBUG: ! CALL function 'Get-VT100Color'
DEBUG: 15+ if ( >>>> !$Host.UI.SupportsVirtualTerminal -or (Test-Path env:__SuppressAnsiEscapeSequences)) {
DEBUG: 19+ return >>>> [System.Management.Automation.VTUtility]::GetEscapeSequence($color)
DEBUG: 20+ >>>> }
DEBUG: ! SET $errorColor = ''.
DEBUG: 51+ >>>> $accentColor = Get-VT100Color ($Host.PrivateData.ErrorAccentColor ?? $errorColor)
DEBUG: 14+ function Get-VT100Color([ConsoleColor] $color) >>>> {
DEBUG: ! CALL function 'Get-VT100Color'
DEBUG: 15+ if ( >>>> !$Host.UI.SupportsVirtualTerminal -or (Test-Path env:__SuppressAnsiEscapeSequences)) {
DEBUG: 19+ return >>>> [System.Management.Automation.VTUtility]::GetEscapeSequence($color)
DEBUG: 20+ >>>> }
DEBUG: ! SET $accentColor = ''.
DEBUG: 54+ >>>> $posmsg = ''
DEBUG: ! SET $posmsg = ''.
DEBUG: 55+ >>>> $headerWhitespace = ''
DEBUG: ! SET $headerWhitespace = ''.
DEBUG: 56+ >>>> $offsetWhitespace = ''
DEBUG: ! SET $offsetWhitespace = ''.
DEBUG: 57+ >>>> $message = ''
DEBUG: ! SET $message = ''.
DEBUG: 58+ >>>> $prefix = ''
DEBUG: ! SET $prefix = ''.
DEBUG: 60+ if ( >>>> $myinv -and $myinv.ScriptName -or $myinv.ScriptLineNumber -gt 1 -or $err.CategoryInfo.Category -eq 'ParserError') {
DEBUG: 134+ if ( >>>> ! $err.ErrorDetails -or ! $err.ErrorDetails.Message) {
DEBUG: 135+ if ( >>>> $err.CategoryInfo.Category -eq 'ParserError' -and $err.Exception.Message.Contains("~$newline")) {
DEBUG: 139+ elseif ( >>>> $err.Exception) {
DEBUG: 140+ >>>> $message += $err.Exception.Message
DEBUG: ! SET $message = 'The specified mount name 'vis' is already in use.'.
DEBUG: 154+ if ( >>>> $myinv -and $myinv.ScriptName -or $err.CategoryInfo.Category -eq 'ParserError') {
DEBUG: 194+ >>>> $posmsg += "${errorColor}" + $message
DEBUG: ! SET $posmsg = 'The specified mount name 'vis' is already in use.'.
DEBUG: 196+ >>>> $reason = 'Error'
DEBUG: ! SET $reason = 'Error'.
DEBUG: 197+ if ( >>>> $err.Exception -and $err.Exception.WasThrownFromThrowStatement) {
DEBUG: 201+ elseif ( >>>> $myinv.MyCommand -and (Get-Command -Name $myinv.MyCommand -ErrorAction Ignore))
DEBUG: 203+ >>>> $reason = $myinv.MyCommand
DEBUG: ! SET $reason = 'Import-Module'.
DEBUG: 222+ >>>> $errorMsg = 'Error'
DEBUG: ! SET $errorMsg = 'Error'.
DEBUG: 224+ >>>> "${errorColor}${reason}: ${posmsg}${resetcolor}"
DEBUG: 225+ >>>> }
DEBUG: 1+ & >>>> { Set-StrictMode -Version 1; $this.Exception.InnerException.PSMessageDetails }
DEBUG: ! CALL function '<ScriptBlock>'
DEBUG: 1+ & { >>>> Set-StrictMode -Version 1; $this.Exception.InnerException.PSMessageDetails }
DEBUG: 1+ & { Set-StrictMode -Version 1; >>>> $this.Exception.InnerException.PSMessageDetails }
DEBUG: 1+ & { Set-StrictMode -Version 1; $this.Exception.InnerException.PSMessageDetails >>>> }
Import-Module: The specified mount name 'vis' is already in use.
PS /home/user> Get-Module | ft -AutoSize
DEBUG: 1+ >>>> Get-Module | ft -AutoSize
DEBUG: ! CALL function '<ScriptBlock>'
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Manifest 7.0.0.0 Microsoft.PowerShell.Management {Add-Content, Clear-Content, Clear-Item, Clear-ItemProperty…}
Manifest 7.0.0.0 Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Object…}
Script 0.2.0 PowerShellEditorServices.Commands {Clear-Host, ConvertFrom-ScriptExtent, ConvertTo-ScriptExtent, Find-Ast…}
Binary 0.2.0 PowerShellEditorServices.VSCode {Close-VSCodeHtmlContentView, New-VSCodeHtmlContentView, Set-VSCodeHtmlContentView, Show-VSCodeHtmlContentView…}
Script 2.0.2 PSReadLine {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PSReadLineKeyHandler, Set-PSReadLineKeyHandler…}
Script 7.0.0.15939650 VMware.Vim
Script 12.0.0.15939657 VMware.VimAutomation.Cis.Core {Connect-CisServer, Disconnect-CisServer, Get-CisService}
Script 12.0.0.15939652 VMware.VimAutomation.Common {Get-Task, New-OAuthSecurityContext, Stop-Task, Wait-Task}
Script 12.0.0.15939655 VMware.VimAutomation.Core {Add-PassthroughDevice, Add-VirtualSwitchPhysicalNetworkAdapter, Add-VMHost, Add-VMHostNtpServer…}
Script 12.0.0.15939651 VMware.VimAutomation.Sdk {Get-ErrorReport, Get-InstallPath, Get-PSVersion}
@atanasa - recommended for closure based on age of the issue and 0 reactions.
Ryan Johnson Distinguished Engineer, VMware by Broadcom
"and 0 reactions"...