That is strange. From a client directly in the domain the folloing script works. From an client form a workgroup it sometimes works.
$VMs = Get-VM "sv063050" | Where { $_.PowerState -eq "PoweredOn" }
SOFTWARE\INTEL\LANDesk\VirusProtect6\CurrentVersion
ForEach ($VM in $VMs) {
$reg = http://Microsoft.Win32.RegistryKey::OpenRemoteBaseKey('LocalMachine', $VM.Guest.Hostname)
Write-Host "Registry Value for: "$VM.Guest.Hostname ": " $reg.OpenSubKey("SOFTWARE\INTEL\LANDesk\VirusProtect6\CurrentVersion\").GetValue("ProductVersion")
Registry Value is in a decimal format
$deci = $reg.OpenSubKey("SOFTWARE\INTEL\LANDesk\VirusProtect6\CurrentVersion\").GetValue("ProductVersion")
Write-Host "deci" $deci
Convert the Decimal value to hex valuae
$hex = ::ToString($deci,16)
Write-Host " Registry Value in HEX " $hex
Which methode do I did to get the first four digits of the hex value ?
I want to do this what is decribed in the symantec articel
http://www.symantec.com/business/support/index?page=content&id=TECH99042&actp=search&viewlocale=en_US&searchid=1287488497592
To convert the hexadecimal to a decimal number
1.Separate the first four digits of the hexadecimal number from the last four digits of the hexadecimal number.
For example, the hexadecimal number 034e02ee becomes 034e and 02ee.
2.Convert the first four-digit hexadecimal number to decimal, using Calc.exe or some other method.
For example, the hexadecimal number 034e becomes 846. The last two digits of this number specifies the build number. In this case, a value of 846 means build 46.
3.Convert the second four-digit hexadecimal number to decimal, using Calc.exe or some other method.
For example, the hexadecimal number 02ee becomes 750. This number specifies the version number. In this case, a value of 750 means version 7.50.