Comments (2)
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 theImport-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 theImport-DrsRule
invocation that you are making?
from drsrule.
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)
- Module version not current HOT 1
- Check if VM is in a DrsVMGroup HOT 7
- Errors not throwing actual error. HOT 1
- VMware.VimAutomation.Core path change in 6.5.1 HOT 2
- New-DrsVMtoVMHostRule setting affinity correctly? HOT 2
- Add support for SDRS HOT 1
- Error at addition in empty group the VM list HOT 1
- Module init failing for machine with multiple version of PowerCLI available HOT 1
- Module won't load if VMware.VimAutomation.Core not already loaded HOT 1
- Metadata file VMware.Vim.dll could not be found HOT 1
- Deprecate/remove use of Latest tag and antiquated distro means
- Unable to find type [DRSRule.VMGroup] HOT 18
- Improvement: start using modern Class capabilities HOT 2
- Improvement: add Argument Completers to cmdlet parameters HOT 1
- Add Pester tests for more than Get-* cmdlets HOT 1
- Unable to find type [DRSRule_VMToVMRule] HOT 7
- Cannot find type [DRSRule_VMGroup]: Verify that the assembly containing this type is loaded HOT 10
- Import-DrsRule does not support specifying rule by type HOT 1
- Please Add Functionality to Remove VMs out using Set-DrsVMToVMRule
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drsrule.