VMware Cloud Community
bingzofo
Contributor
Contributor

Hi, I want to ask is it possible to check Windows VM REGKEYS via vmTools using some PS script?

Hi,

My customer asked me to generate some report from MS HKEY however hes not very happy to open the default PS ports. Therefore I want to ask if its possible to reach the regkeys using vmtools.

2 Replies
Sreejesh_D
Virtuoso
Virtuoso

0 Kudos
LucD
Leadership
Leadership

You can use the Invoke-VMScript cmdlet, it doesn't require any additional ports to be opened.

You might need to have the VMware Tools installed inside the VM.

Note that you might be required to provide the GuestCredential parameter, if your current credentials do not have access inside the guest OS.

This is a sample to read some reg values from the guest OS inside a specific VM

$vmName = 'MyVM'

$code = @"

Get-ItemProperty -Path 'hklm:\SOFTWARE\VMware, Inc.\VMware Tools'

"@

Get-VM -Name $vmName |

Invoke-VMScript -ScriptText $code -ScriptType Powershell


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