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.
hi,
here is an example for editing registry using powercli http://www.wooditwork.com/2010/09/01/disk-timeout-settings-in-registry-for-vms-using-powercli/
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