4 Replies Latest reply on May 26, 2020 6:14 AM by piyushranusri

    SRM Report Module

    piyushranusri Novice

      Powershell script the line. highlighted line. any suggestion what am missing here?

       

       

      $VMname = Get-VM -id $($OneDetail.MoRef)
      $Status = $OneDetail.Overallstatus
      $Details = @{
      VMname = $VMname
      ProtectionGroup = $ProtectionGroup
      Description = $Description
      Type = $Type
      Datastore = $Datastore
      Descriptio = $Description
      Status = $Status

      getting error

       

      ============

      Get-VM : 5/22/2020 10:18:50 AM    Get-VM        VM with id 'VirtualMachine-vm-272891' was not found using the specified filter(s).   
      At line:40 char:23
      +             $VMname = Get-VM -id $($OneDetail.MoRef)
      +                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : ObjectNotFound: (:) [Get-VM], VimException
          + FullyQualifiedErrorId : Core_OutputHelper_WriteNotFoundError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM

      Get-VM : 5/22/2020 10:18:53 AM    Get-VM        VM with id 'VirtualMachine-vm-67421' was not found using the specified filter(s).   
      At line:40 char:23
      +             $VMname = Get-VM -id $($OneDetail.MoRef)
      +                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : ObjectNotFound: (:) [Get-VM], VimException
          + FullyQualifiedErrorId : Core_OutputHelper_WriteNotFoundError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM

       

       

       

       

      Get-VM : 5/22/2020 10:18:50 AM    Get-VM        VM with id 'VirtualMachine-vm-272891' was not found using the specified filter(s).   
      At line:40 char:23
      +             $VMname = Get-VM -id $($OneDetail.MoRef)
      +                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : ObjectNotFound: (:) [Get-VM], VimException
          + FullyQualifiedErrorId : Core_OutputHelper_WriteNotFoundError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM

      Get-VM : 5/22/2020 10:18:53 AM    Get-VM        VM with id 'VirtualMachine-vm-67421' was not found using the specified filter(s).   
      At line:40 char:23
      +             $VMname = Get-VM -id $($OneDetail.MoRef)
      +                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : ObjectNotFound: (:) [Get-VM], VimException
          + FullyQualifiedErrorId : Core_OutputHelper_WriteNotFoundError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM