Open mtboren opened 5 years ago
Hello, @gillx0101
A few things to help us understand what might be happening here:
-ShowOnly
parameter on the Import-DrsRule
invocation that you are making? If so, what is the result?-Name
parameter on the Import-DrsRule
invocation that you are making?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 ??
Opening new issue from comment from user @gillx0101 (original comment here)