VMware Cloud Community
ajbrehm
Enthusiast
Enthusiast
Jump to solution

Configure Open-VMConsoleWindow

Since I installed VMware Workstation on my admin computer, the Open-VMConsoleWindow stopped working. It also appears to ignore configurations set with Set-PowerCLIConfiguration:

The VMConsoleWindowBrowser parameter of Set-PowerCLIConfiguration cmdlet is deprecated and is ignored.

How can I make it work again with vmrc.exe?

At the moment every invocation of Open-VMConsoleWindow starts an instance of the VMware Workstation GUI (but does not open a VM console window or connection). This is rather useless.

 

 

 

 

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
ajbrehm
Enthusiast
Enthusiast
Jump to solution

I think I figured it out.

Problem is the message about the parameter -VMConsoleWindowBrowser being deprecated:

The VMConsoleWindowBrowser parameter of Set-PowerCLIConfiguration cmdlet is deprecated and is ignored.

It is indeed deprecated and ignored, it doesn't matter what I set it to.

Instead vmrc.exe has to be added as a handler for the vmrc: URL type in the registry. (This does not appear to be documented anywhere.) When VMware Workstation is installed, it replaces the vmrc: handler with itself (even though it doesn't work).

Re-adding vmrc.exe makes it work again:

Set-ItemProperty -Path HKLM:\SOFTWARE\Classes\vmrc\shell\open\command -Value '"C:\Program Files (x86)\VMware\VMware Remote Console\vmrc.exe" "%1"' -Name '(default)'

It is set again:

PS C:\> Get-ItemProperty -Path HKLM:\SOFTWARE\Classes\vmrc\shell\open\command

(default) : "C:\Program Files (x86)\VMware\VMware Remote Console\vmrc.exe" "%1"
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Classes\vmrc\shell\open\command
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Classes\vmrc\shell\open
PSChildName : command
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry

Seems like Open-VMConsoleWindow does not open a console window any more but instead hands a URL to the Windows shell and hopes for the best. This worked until installation of VMware Workstation.

I hope Workstation will not overwrite it again.

 

 

 

View solution in original post

0 Kudos
7 Replies
Thomas_França
Enthusiast
Enthusiast
Jump to solution

When you have VMware Workstation installed, it might interfere with the behavior of PowerCLI commands related to opening VM console windows.

 

Verify Compatibility:
Ensure that you are using compatible versions of VMware Workstation and PowerCLI. Compatibility issues might arise if you are using versions that are not designed to work together. Check the official VMware and PowerCLI documentation for compatibility information.

PowerCLI Configuration:
Instead of using the deprecated VMConsoleWindowBrowser parameter, you can try configuring the default console window behavior using the VMConsoleWindowBrowserPath parameter. For example:

powershell
Copy code
Set-PowerCLIConfiguration -VMConsoleWindowBrowserPath "C:\Program Files (x86)\VMware\VMware Workstation\vmrc.exe"
Adjust the path based on your VMware Workstation installation directory.

Reinstall PowerCLI:
Uninstall PowerCLI and then reinstall it. Sometimes, a fresh installation can resolve compatibility issues and ensure that all components are correctly registered.

Check Environment Variables:
Ensure that the directory containing vmrc.exe is included in the system's PATH environment variable. This ensures that PowerShell can find and execute the executable.

Update Software:
Make sure that you are using the latest versions of both VMware Workstation and PowerCLI. Software updates often include bug fixes and compatibility improvements.

ajbrehm
Enthusiast
Enthusiast
Jump to solution

Hi,

This doesn't work:

PS C:\> Set-PowerCLIConfiguration -VMConsoleWindowBrowserPath "C:\Program Files (x86)\VMware\VMware Workstation\vmrc.exe" -Scope AllUsers
Set-PowerCLIConfiguration: A parameter cannot be found that matches parameter name 'VMConsoleWindowBrowserPath'.
PS C:\> Get-PowerCLIVersion

PowerCLI Version
----------------
VMware.PowerCLI 13.2.1 build 22851661
---------------
Component Versions
---------------
VMware Common PowerCLI Component 13.2 build 22643733
VMware Cis Core PowerCLI Component PowerCLI Component 13.2 build 22643734
VMware VimAutomation VICore Commands PowerCLI Component PowerCLI Component 13.2 build 22643732

The parameter doesn't exist. How did you configure it if you did?

 

0 Kudos
LucD
Leadership
Leadership
Jump to solution

The parameter is named VMConsoleWindowBrowser without the Path suffix.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
ajbrehm
Enthusiast
Enthusiast
Jump to solution

Which brings us back to the original problem:

The VMConsoleWindowBrowser parameter of Set-PowerCLIConfiguration cmdlet is deprecated and is ignored.

That's what happens to me when I try the documented parameter.

 

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Do you have VMRC installed?
In Open-VMConsoleWindow is not supported on PowerShell | VMware PowerCLI (aha.io) Kamen states that you need to have VMRC installed.

Btw, the compatibility matrix for PowerCLI and Workstation is empty, so I'm not sure if they are even supposed to work together.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
ajbrehm
Enthusiast
Enthusiast
Jump to solution

"Do you have VMRC installed?"

I do. But it's irrelevant to the problem. The error doesn't refer to PowerCLI not finding VMRC, it refers to the parameter being deprecated.

 

"Btw, the compatibility matrix for PowerCLI and Workstation is empty, so I'm not sure if they are even supposed to work together."

 

Also irrelevant. I am not trying to make them "work together". I am just trying to configure Open-VMConsoleWindow with VMRC.

 

 

0 Kudos
ajbrehm
Enthusiast
Enthusiast
Jump to solution

I think I figured it out.

Problem is the message about the parameter -VMConsoleWindowBrowser being deprecated:

The VMConsoleWindowBrowser parameter of Set-PowerCLIConfiguration cmdlet is deprecated and is ignored.

It is indeed deprecated and ignored, it doesn't matter what I set it to.

Instead vmrc.exe has to be added as a handler for the vmrc: URL type in the registry. (This does not appear to be documented anywhere.) When VMware Workstation is installed, it replaces the vmrc: handler with itself (even though it doesn't work).

Re-adding vmrc.exe makes it work again:

Set-ItemProperty -Path HKLM:\SOFTWARE\Classes\vmrc\shell\open\command -Value '"C:\Program Files (x86)\VMware\VMware Remote Console\vmrc.exe" "%1"' -Name '(default)'

It is set again:

PS C:\> Get-ItemProperty -Path HKLM:\SOFTWARE\Classes\vmrc\shell\open\command

(default) : "C:\Program Files (x86)\VMware\VMware Remote Console\vmrc.exe" "%1"
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Classes\vmrc\shell\open\command
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Classes\vmrc\shell\open
PSChildName : command
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry

Seems like Open-VMConsoleWindow does not open a console window any more but instead hands a URL to the Windows shell and hopes for the best. This worked until installation of VMware Workstation.

I hope Workstation will not overwrite it again.

 

 

 

0 Kudos