Giter Club home page Giter Club logo

Comments (2)

mtboren avatar mtboren commented on August 14, 2024

Hello, @gillx0101

A few things to help us understand what might be happening here:

  • I take it you are on PowerShell 5.* -- is that fact? (What is the PowerShell version you are using)
  • Are we able to do a dry run using the -ShowOnly parameter on the Import-DrsRule invocation that you are making? If so, what is the result?
  • What happens when you try to import just the given DrsVMHostGroup by using the -Name parameter on the Import-DrsRule invocation that you are making?

from drsrule.

gillx0101 avatar gillx0101 commented on August 14, 2024

Thanks @mtboren for taking a look. I am using a Windows 10 client with PS 5.1 installed. Below is the output running with the "ShowOnly" switch

PS C:\WINDOWS\system32> Import-DrsRule d:\temp\drs.txt -ShowOnly
Method invocation failed because [System.Management.Automation.PSCustomObject] does not contain a method named
'GetEnumerator'.
At C:\Program Files\WindowsPowerShell\Modules\DRSRule\2.0.0\DRSRule.psm1:1557 char:7
+       $arrRuleObjects_filtered = $ruleObjects.GetEnumerator() | Where ...
+       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (GetEnumerator:String) [], RuntimeException
    + FullyQualifiedErrorId : MethodNotFound

Not sure if I follow your last point? I created a VM Host Group with a name "DRSHost", but when I tried to export got the following:

PS C:\WINDOWS\system32> Export-DrsRule -Name DRSHost

cmdlet Export-DrsRule at command pipeline position 1
Supply values for the following parameters:
Path: d:\temp\drshstsgroup.txt
Unable to find type [DRSRule_VMToVMRule].
At C:\Program Files\WindowsPowerShell\Modules\DRSRule\2.0.0\DRSRule.psm1:271 char:15
+   [OutputType([DRSRule_VMToVMRule],[VMware.Vim.ClusterAffinityRuleSpe ...
+               ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (DRSRule_VMToVMRule:TypeName) [], RuntimeException
    + FullyQualifiedErrorId : TypeNotFound

I think its worth noting I also get the above intermittently when just running an export-drsrule and providing a path for the output ??

from drsrule.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.