Display VMHost of VM

BatchPatch Forums Home Forums BatchPatch Support Forum Display VMHost of VM

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #9190
    sal
    Participant

    Who wants a gold star today?

    I have multiple vms in batch patch as well as vmhosts, naturally. I’m trying to highlight multiple vm’s and run a powershell line to display what host each vm is on. This is the line I put into remote process.

    cmd.exe /c echo . | powershell.exe -ExecutionPolicy Bypass -command “get-item “HKLM:SOFTWAREMicrosoftVirtual MachineGuestParameters”).GetValue(“HostName”)

    The remote command output log is saying “Could not find file ‘\servernameC$Program FilesBatchPatchBatchPatchRemoteProcessOutput884964889.log’

    Any ideas?

    Thanks in advance.

    #11014
    doug
    Moderator

    sal – BatchPatch has built-in functionality to retrieve registry values. Check ‘Actions > Get information > Get registry key/value’

    I hope this helps.

    -Doug

    #11013
    sal
    Participant

    Thanks Doug,

    I got that working but is there a way to just return the value that I’m looking for instead of the HKLM:SOFTWAREMicrosoftVirtual MachineGuestParameters before it?

    Thanks again.

    #11008
    doug
    Moderator

    sal – Unfortunately I don’t have a way for you to cut out the excess. Probably the easiest thing to do when reviewing the report for more than one computer is to select all the desired rows and use ‘Actions > expand rows’

    -Doug

    #10982
    jjlandstrom
    Participant

    Not sure if this will help.

    I get specific key info with reg query via a remote process and | findstr. Here are some examples.

    reg query “HKEY_LOCAL_MACHINESoftwareMicrosoftInternet Explorer” /v svcVersion | findstr svcVersion

    reg query “HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv4Full” | findstr Version

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.