Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

My Information

  • Location
    St. Louis, Missouri
  • Agent Count
    4000 - 6000 Agents
  1. I get the same error on the host itself. We have about 68 HyperV hosts and only 14 get this error. I'll keep plugging away at it to see if I can figure out why the error, unless it is related to the fact that these HyperV hosts don't have any VMs on it and that would be the reason for the null value. Is there a way to check for this? I really need to learn Powershell so I don't have to ask all these questions! M
  2. @MGreen This is the error I getting. At first I thought it was just Server 2008 R2 machines but it is happening on a few Windows Server 2012 R2 as well. The strange thing is out of 69 servers of various OS levels, it fails on 12 with the below message or an error about The 'get-vm' command was found in the module 'HyperV', but the module could not be loaded. You must provide a value expression on the right-hand side of the '-' operator. At line:1 char:31 + & {$a = get-vm|? {($_.State - <<<< in "Saved","Off" -and $_.AutomaticStartAc tion -ne "Nothing") -and ($_.ReplicationState -eq "Disabled" -or ($_.Name -in ( Get-VMReplication|?{$_.PrimaryServer -eq ([System.Net.Dns]::GetHostByName($env: computerName).HostName)}).VMName))}; if ($a){$a|% {if ((gci (Get-VMHardDiskDriv e -VMName $_.Name -ControllerLocation 0).Path).LastWriteTime -gt (Get-Date).Add Days(-2)){Start-VM $_} }}else {Write-Host "No issues detected."} } + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordEx ception + FullyQualifiedErrorId : ExpectedValueExpression
  3. Thank you for this information! @MGreen How do I modify this to not generate a failure on a server that has the Hyper-V role installed but isn't hosting any VMs? I know that best practice would be to remove the Hyper-V role but that isn't always an option for some of our clients. Thank you in advance, Matt
  4. Joe, Can you share your work with us minus the API key? Thank you.
  5. That fixed it for me! Thanks @lgs141 I'll look to see if I get the error you mention when this finishes running.
  6. It seems the HP and Lenovo lookups are not working for me. I went ahead and signed up for the HP API and got my own API keys but the lookups only work for the first 25 workstations. Every lookup after that fails. In my case I changed the group from 25 to 1000. While it took over 50 minutes to get the results, it grabbed all my HP workstation lookups and updated successfully. I'm looking into the Lenovo powershell to see if I can figure out why my lookups fail but I greatly appreciate your work on this script. If I can get this working with the Lenovo, We will be able to drop our Warranty Masters account and save money.
  7. What command(s) did you use on this? I've tried using the following on one computer and it still fails every day? attrib -R %ltsvcdir%\packages\hitmanpro\ /S /D
  • Create New...