Skip to content

Cant seem to make your module work in Server 2012 R2...Do you have any clues as to why? Here are the errors? #19

Description

@roddines

PS C:\Users\Administrator> Import-Module .\Desktop\VMSwitchPortMonitorMode.psm1
PS C:\Users\Administrator> get-VMSwitchPortMonitorMode -SwitchName VLAN10-Management-External
gwmi : Invalid object path
At C:\Users\Administrator\Desktop\VMSwitchPortMonitorMode.psm1:49 char:21

  •         $eswp = gwmi -Namespace $ns -Query "ASSOCIATORS OF {$lep2} WHERE Res ...
    
  • - CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], ManagementException
    - FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
    
    

gwmi : Invalid object path
At C:\Users\Administrator\Desktop\VMSwitchPortMonitorMode.psm1:50 char:19

  •         $sw = gwmi -Namespace $ns -Query "ASSOCIATORS OF {$eswp} WHERE Resul ...
    
  • - CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], ManagementException
    - FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
    
    

gwmi : Invalid object path
At C:\Users\Administrator\Desktop\VMSwitchPortMonitorMode.psm1:49 char:21

  •         $eswp = gwmi -Namespace $ns -Query "ASSOCIATORS OF {$lep2} WHERE Res ...
    
  • - CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], ManagementException
    - FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
    
    

gwmi : Invalid object path
At C:\Users\Administrator\Desktop\VMSwitchPortMonitorMode.psm1:50 char:19

  •         $sw = gwmi -Namespace $ns -Query "ASSOCIATORS OF {$eswp} WHERE Resul ...
    
    • CategoryInfo : InvalidOperation: (:) [Get-WmiObject], ManagementException

    • FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

                                             PortType                                                 MonitorMode
                                             --------                                                 -----------
                                             External                                                        None
                                                 Host                                                        None
      

PS C:\Users\Administrator> get-VMSwitchPortMonitorMode VLAN10-Management-External
gwmi : Invalid object path
At C:\Users\Administrator\Desktop\VMSwitchPortMonitorMode.psm1:49 char:21

  •         $eswp = gwmi -Namespace $ns -Query "ASSOCIATORS OF {$lep2} WHERE Res ...
    
  • - CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], ManagementException
    - FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
    
    

gwmi : Invalid object path
At C:\Users\Administrator\Desktop\VMSwitchPortMonitorMode.psm1:50 char:19

  •         $sw = gwmi -Namespace $ns -Query "ASSOCIATORS OF {$eswp} WHERE Resul ...
    
  • - CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], ManagementException
    - FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
    
    

gwmi : Invalid object path
At C:\Users\Administrator\Desktop\VMSwitchPortMonitorMode.psm1:49 char:21

  •         $eswp = gwmi -Namespace $ns -Query "ASSOCIATORS OF {$lep2} WHERE Res ...
    
  • - CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], ManagementException
    - FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
    
    

gwmi : Invalid object path
At C:\Users\Administrator\Desktop\VMSwitchPortMonitorMode.psm1:50 char:19

  •         $sw = gwmi -Namespace $ns -Query "ASSOCIATORS OF {$eswp} WHERE Resul ...
    
    • CategoryInfo : InvalidOperation: (:) [Get-WmiObject], ManagementException

    • FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

                                             PortType                                                 MonitorMode
                                             --------                                                 -----------
                                             External                                                        None
                                                 Host                                                        None
      

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions