forked from PowerCLIGoodies/DRSRule
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDRSRule.Help.pshproj
2196 lines (2179 loc) · 126 KB
/
DRSRule.Help.pshproj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0"?>
<ModuleObject xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" fVersion="1.1" type="Script" mclass="Module" useSupports="false">
<Name>DRSRule</Name>
<Version>0.1.0</Version>
<Description>Module with functions to manage VMware DRS rule items (rules, groups, etc)</Description>
<HasManifest>true</HasManifest>
<OverridePostCount>false</OverridePostCount>
<FetchPostCount xsi:nil="true" />
<Cmdlets>
<CmdletObject verb="Export" noun="DrsRule">
<Name>Export-DrsRule</Name>
<GeneralHelp>
<Synopsis>Export DRS rules and groups as JSON</Synopsis>
<Description>This cmdlet gets the specified DRS items for the given DRS Clusters, and exports their info as JSON to the given file.
These include DRS VM groups, DRS VMHost groups, DRS VM to VM rules, and DRS VM to VMHost rules.
The exported JSON is suitable (targeted) for use in the Import-DrsRule cmdlet, for recreating exported rule/group objects.</Description>
<Notes />
<InputType />
<InputUrl />
<InputTypeDescription />
<ReturnType />
<ReturnUrl />
<ReturnTypeDescription />
</GeneralHelp>
<ParamSets>
<CommandParameterSetInfo2 Name="__AllParameterSets" Params="Name Cluster Path Verbose Debug ErrorAction WarningAction ErrorVariable WarningVariable OutVariable OutBuffer PipelineVariable" />
</ParamSets>
<Syntax>
<string>Export-DrsRule [[-Name] <String>] [[-Cluster] <PSObject[]>] [-Path <String>]</string>
</Syntax>
<Parameters>
<ParameterDescription type="String" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="false" isPos="true" pos="0" globbing="false">
<Name>Name</Name>
<Attributes>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases />
<Description>Name of rule / DRS group info to get and export. If not specified, will return all rule/group info</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="PSObject[]" varLen="true" required="false" dynamic="false" pipeRemaining="false" pipe="true" pipeProp="false" isPos="true" pos="1" globbing="false">
<Name>Cluster</Name>
<Attributes>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
<string>System.Management.Automation.ValidateScriptAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases />
<Description>Cluster for which to get DRS info</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="String" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="false" isPos="false" pos="named" globbing="false">
<Name>Path</Name>
<Attributes>
<string>System.Management.Automation.ParameterAttribute</string>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
<string>System.Management.Automation.ValidateNotNullOrEmptyAttribute</string>
</Attributes>
<Aliases />
<Description>Path of output file in which to put DRS info in JSON format (relative or absolute). File will be created if non-existent, or overwritten if existent</Description>
<DefaultValue />
</ParameterDescription>
</Parameters>
<Examples>
<Example>
<Name>Example 1</Name>
<Cmd>Export-DrsRule -Path C:\importantStuff\myDrsRuleInfo_$((Get-Date).ToString('ddMMMyyyy_HHmm')).json</Cmd>
<Description>Exports the DRS group/rule information for all clusters in JSON format, stored in given file with the right-now date/time stamp in the filename.</Description>
<Output> Directory: C:\importantStuff
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 1/16/2015 11:10 PM 5520 myDrsRuleInfo_16Jan2015_2310.json</Output>
</Example>
<Example>
<Name>Example 2</Name>
<Cmd>Get-Cluster NewCluster10 | Export-DrsRule -Name *grp0 -Path c:\temp\drsInfo_NewCluster10.json -Verbose</Cmd>
<Description>For this cluster, export the DRS rules/groups whose names are like "*grp0". The -Verbose parameter causes the cmdlet to include a verbose message about the number of rules/groups exported, and the file name to which the information was written.</Description>
<Output>VERBOSE: Exported and saved information for '4' DRS rules/groups to 'c:\temp\drsInfo_NewCluster10.json'
Directory: C:\temp
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 1/17/2015 12:08 AM 1605 drsInfo_NewCluster10.json
</Output>
</Example>
<Example>
<Name>Example 3</Name>
<Cmd>Get-Cluster NewCluster10 | Export-DrsRule -Name doesNotExist* -Path c:\temp\drsInfo_NewCluster10.json -Verbose</Cmd>
<Description>Here, cluster NewCluster10 has no DRS groups or rules defined, yet. So, Export-DrsRule (with the -Verbose parameter) returns a verbose message with information to that effect. No .json file is created.</Description>
<Output>VERBOSE: No DRS group/rule found for like name 'doesNotExist*' in cluster with name like 'NewCluster10'</Output>
</Example>
</Examples>
<RelatedLinks>
<RelatedLink>
<LinkText>Import-DrsRule</LinkText>
<LinkUrl />
</RelatedLink>
</RelatedLinks>
<SupportInformation ad="false" rsat="false" ps2="false" ps3="false" ps4="false" ps5="false" wxp="false" wv="false" w7="false" w8="false" w81="false" w2k3s="false" w2k3e="false" w2k3d="false" w2k8s="false" w2k8e="false" w2k8d="false" w2k8r2s="false" w2k8r2e="false" w2k8r2d="false" w2k12s="false" w2k12d="false" w2k12r2s="false" w2k12r2d="false" />
<Publish>false</Publish>
</CmdletObject>
<CmdletObject verb="Get" noun="DrsVMGroup">
<Name>Get-DrsVMGroup</Name>
<GeneralHelp>
<Synopsis>This cmdlet retrieves the DRS VM groups.</Synopsis>
<Description>This cmdlet retrieves the DRS VM groups.
It returns DRS VM groups that correspond to the filter criteria provided by the cmdlet parameters.
The default return type holds more information than the "raw" DRS object that vSphere uses. There is also a switch to allow for just returning said raw DRS object, quite useful for consumption by other cmdlets in this module.</Description>
<Notes />
<InputType />
<InputUrl />
<InputTypeDescription />
<ReturnType>[DRSRule.VMGroup];[VMware.Vim.ClusterVmGroup]</ReturnType>
<ReturnUrl />
<ReturnTypeDescription>Object with information about the given DRS VM group, or a raw vSphere object
</ReturnTypeDescription>
</GeneralHelp>
<ParamSets>
<CommandParameterSetInfo2 Name="__AllParameterSets" Params="Name Cluster ReturnRawGroup Verbose Debug ErrorAction WarningAction ErrorVariable WarningVariable OutVariable OutBuffer PipelineVariable" />
</ParamSets>
<Syntax>
<string>Get-DrsVMGroup [[-Name] <String>] [[-Cluster] <PSObject[]>] [-ReturnRawGroup]</string>
</Syntax>
<Parameters>
<ParameterDescription type="String" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="false" isPos="true" pos="0" globbing="false">
<Name>Name</Name>
<Attributes>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases />
<Description>Name of DRS VM Group to get (or, all if no name specified)</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="PSObject[]" varLen="true" required="false" dynamic="false" pipeRemaining="false" pipe="true" pipeProp="false" isPos="true" pos="1" globbing="false">
<Name>Cluster</Name>
<Attributes>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases />
<Description>Cluster from which to get DRS VM group (or, all clusters if no name specified)</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="SwitchParameter" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="false" isPos="false" pos="named" globbing="false">
<Name>ReturnRawGroup</Name>
<Attributes>
<string>System.Management.Automation.ParameterAttribute</string>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
</Attributes>
<Aliases />
<Description>Switch: return "raw" VMware.Vim.ClusterVmGroup object (contains less info, but useful to other functions that can consume this raw object)</Description>
<DefaultValue />
</ParameterDescription>
</Parameters>
<Examples>
<Example>
<Name>Example 1</Name>
<Cmd>Get-DRSVMGroup -Name '*VM Group 1*'</Cmd>
<Description>Returns all DRS VM groups with name like '*VM Group 1*'</Description>
<Output>Name Cluster UserCreated VM
---- ------- ----------- --
VM Group 1 Cluster1 True {VM1,VM2}
VM Group 12 Cluster1 True {VM3}
New VM Group 100 Cluster2 True {VM4,VM5,VM6}</Output>
</Example>
<Example>
<Name>Example 2</Name>
<Cmd>Get-DRSVMGroup -Cluster Cluster1 -Name 'VM Group 1'</Cmd>
<Description>The DRS VM group with the exact name 'VM Group 1' from Cluster1 will be returned.</Description>
<Output>Name Cluster UserCreated VM
---- ------- ----------- --
VM Group 1 Cluster1 True {VM1,VM2}</Output>
</Example>
<Example>
<Name>Example 3</Name>
<Cmd>Get-Cluster Cluster2 | Get-DrsVmGroup</Cmd>
<Description>Returns all DRS VM groups in cluster "Cluster2"</Description>
<Output>Name Cluster UserCreated VM
---- ------- ----------- --
VM Group 5 Cluster2 True {VM101,VM102}
testVMGroup Cluster2 True {VM0,VM1001,VM1002}</Output>
</Example>
</Examples>
<RelatedLinks>
<RelatedLink>
<LinkText>New-DrsVMGroup</LinkText>
<LinkUrl />
</RelatedLink>
<RelatedLink>
<LinkText>Remove-DrsVMGroup</LinkText>
<LinkUrl />
</RelatedLink>
<RelatedLink>
<LinkText>Set-DrsVMGroup</LinkText>
<LinkUrl />
</RelatedLink>
</RelatedLinks>
<SupportInformation ad="false" rsat="false" ps2="false" ps3="false" ps4="false" ps5="false" wxp="false" wv="false" w7="false" w8="false" w81="false" w2k3s="false" w2k3e="false" w2k3d="false" w2k8s="false" w2k8e="false" w2k8d="false" w2k8r2s="false" w2k8r2e="false" w2k8r2d="false" w2k12s="false" w2k12d="false" w2k12r2s="false" w2k12r2d="false" />
<Publish>false</Publish>
</CmdletObject>
<CmdletObject verb="Get" noun="DrsVMHostGroup">
<Name>Get-DrsVMHostGroup</Name>
<GeneralHelp>
<Synopsis>This cmdlet retrieves the DRS VMHost groups.</Synopsis>
<Description>This cmdlet retrieves the DRS VM groups.
It returns DRS VM groups that correspond to the filter criteria provided by the cmdlet parameters.
The default return type holds more information than the "raw" DRS object that vSphere uses. There is also a switch to allow for just returning said raw DRS object, quite useful for consumption by other cmdlets in this module.</Description>
<Notes />
<InputType />
<InputUrl />
<InputTypeDescription />
<ReturnType>[DRSRule.VMHostGroup];[VMware.Vim.ClusterHostGroup]</ReturnType>
<ReturnUrl />
<ReturnTypeDescription>Object with information about the given DRS VMHost group, or a raw vSphere object
</ReturnTypeDescription>
</GeneralHelp>
<ParamSets>
<CommandParameterSetInfo2 Name="__AllParameterSets" Params="Name Cluster ReturnRawGroup Verbose Debug ErrorAction WarningAction ErrorVariable WarningVariable OutVariable OutBuffer PipelineVariable" />
</ParamSets>
<Syntax>
<string>Get-DrsVMHostGroup [[-Name] <String>] [[-Cluster] <PSObject[]>] [-ReturnRawGroup]</string>
</Syntax>
<Parameters>
<ParameterDescription type="String" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="false" isPos="true" pos="0" globbing="false">
<Name>Name</Name>
<Attributes>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
<string>System.Management.Automation.ValidateNotNullOrEmptyAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases />
<Description>Name of DRS VM Group to get (or, all if no name specified)</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="PSObject[]" varLen="true" required="false" dynamic="false" pipeRemaining="false" pipe="true" pipeProp="false" isPos="true" pos="1" globbing="false">
<Name>Cluster</Name>
<Attributes>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
<string>System.Management.Automation.ValidateNotNullOrEmptyAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases />
<Description>Cluster from which to get DRS VMHost group (or, all clusters if no name specified)</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="SwitchParameter" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="false" isPos="false" pos="named" globbing="false">
<Name>ReturnRawGroup</Name>
<Attributes>
<string>System.Management.Automation.ParameterAttribute</string>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
</Attributes>
<Aliases />
<Description>Switch: return "raw" VMware.Vim.ClusterHostGroup object (contains less info, but useful to other functions that can consume this raw object)</Description>
<DefaultValue />
</ParameterDescription>
</Parameters>
<Examples>
<Example>
<Name>Example 1</Name>
<Cmd>Get-DRSVMHostGroup -Name '*VMHost Group 1*'</Cmd>
<Description>Returns all DRS VMHost groups with name like '*VMHost Group 1*'</Description>
<Output>Name Cluster UserCreated VMHost
---- ------- ----------- ------
VMHost Group 1 Cluster1 True {esx1,esx2}
VMHost Group 12 Cluster1 True {esx3}
New VMHost Group 1 Cluster2 True {esx4,esx5,esx6}</Output>
</Example>
<Example>
<Name>Example 2</Name>
<Cmd>Get-DRSVMHostGroup -Cluster Cluster1 -Name 'VMHost Group 1'</Cmd>
<Description>The DRS VMHost group with the exact name 'VMHost Group 1' from Cluster1 will be returned.</Description>
<Output>Name Cluster UserCreated VMHost
---- ------- ----------- ------
VMHost Group 1 Cluster1 True {esx1,esx2}</Output>
</Example>
<Example>
<Name>Example 3</Name>
<Cmd>Get-Cluster Cluster2 | Get-DrsVMHostGroup</Cmd>
<Description>Returns all DRS VMHost groups in cluster "Cluster2"</Description>
<Output>Name Cluster UserCreated VMHost
---- ------- ----------- ------
oldVMHostGroup Cluster2 True {esx11,esx12}
VMHost Group DR Cluster2 True {esx13}
New VMHost Grp 3 Cluster2 True {esx14,esx15,esx16}</Output>
</Example>
</Examples>
<RelatedLinks>
<RelatedLink>
<LinkText>New-DrsVMHostGroup</LinkText>
<LinkUrl />
</RelatedLink>
<RelatedLink>
<LinkText>Remove-DrsVMHostGroup</LinkText>
<LinkUrl />
</RelatedLink>
<RelatedLink>
<LinkText>Set-DrsVMHostGroup</LinkText>
<LinkUrl />
</RelatedLink>
</RelatedLinks>
<SupportInformation ad="false" rsat="false" ps2="false" ps3="false" ps4="false" ps5="false" wxp="false" wv="false" w7="false" w8="false" w81="false" w2k3s="false" w2k3e="false" w2k3d="false" w2k8s="false" w2k8e="false" w2k8d="false" w2k8r2s="false" w2k8r2e="false" w2k8r2d="false" w2k12s="false" w2k12d="false" w2k12r2s="false" w2k12r2d="false" />
<Publish>false</Publish>
</CmdletObject>
<CmdletObject verb="Get" noun="DrsVMToVMHostRule">
<Name>Get-DrsVMToVMHostRule</Name>
<GeneralHelp>
<Synopsis>This cmdlet retrieves the DRS VM to VMHost rules.</Synopsis>
<Description>This cmdlet retrieves the DRS VM to VMHost rules.
It returns a number of DRS VM to VMHost rules that correspond to the filter criteria provided by the cmdlet parameters.
The default return type holds more information than the "raw" DRS object that vSphere uses. There is also a switch to allow for just returning said raw DRS object, quite useful for consumption by other cmdlets in this module.</Description>
<Notes />
<InputType />
<InputUrl />
<InputTypeDescription />
<ReturnType>[DRSRule.VMToVMHostRule];[VMware.Vim.ClusterVmHostRuleInfo]</ReturnType>
<ReturnUrl />
<ReturnTypeDescription>Object with information about the given DRS VM to VMHost rule, or a raw vSphere object
</ReturnTypeDescription>
</GeneralHelp>
<ParamSets>
<CommandParameterSetInfo2 Name="__AllParameterSets" Params="Name Cluster ReturnRawRule Verbose Debug ErrorAction WarningAction ErrorVariable WarningVariable OutVariable OutBuffer PipelineVariable" />
</ParamSets>
<Syntax>
<string>Get-DrsVMToVMHostRule [[-Name] <String>] [[-Cluster] <PSObject[]>] [-ReturnRawRule]</string>
</Syntax>
<Parameters>
<ParameterDescription type="String" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="false" isPos="true" pos="0" globbing="false">
<Name>Name</Name>
<Attributes>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
<string>System.Management.Automation.ValidateNotNullOrEmptyAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases />
<Description>Name of DRS VM affinity/antiaffinity rule to get (or, all if no name specified)</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="PSObject[]" varLen="true" required="false" dynamic="false" pipeRemaining="false" pipe="true" pipeProp="false" isPos="true" pos="1" globbing="false">
<Name>Cluster</Name>
<Attributes>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases />
<Description>Cluster from which to get DRS VM-to-VM rule (or, all clusters if no name specified)</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="SwitchParameter" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="false" isPos="false" pos="named" globbing="false">
<Name>ReturnRawRule</Name>
<Attributes>
<string>System.Management.Automation.ParameterAttribute</string>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
</Attributes>
<Aliases />
<Description>Switch: return DRS VM to VM rule as "raw" VMware.Vim.ClusterHostGroup object (contains less info, but useful to other functions that can consume this raw object)</Description>
<DefaultValue />
</ParameterDescription>
</Parameters>
<Examples>
<Example>
<Name>Example 1</Name>
<Cmd>Get-DrsVMToVMHostRule -Name 'Rule 1*'</Cmd>
<Description>Returns all DRS VM to VMHost rules with name like 'Rule 1*'</Description>
<Output>Name Cluster Enabled Mandatory VMGroupName
---- ------- ------- --------- -----------
Rule 1 Cluster1 False False VM Group 1
Rule 11 Cluster2 True True All VM</Output>
</Example>
<Example>
<Name>Example 2</Name>
<Cmd>Get-DrsVMtoVMHostRule -Cluster Cluster[12]</Cmd>
<Description>Returns all DRS VM to VMHost rules in clusters named "Cluster1" and "Cluster2"</Description>
<Output>Name Cluster Enabled Mandatory VMGroupName
---- ------- ------- --------- -----------
Rule 0 Cluster1 True False VM Group 1
Rule 1 Cluster1 False False VM Group 12
Rule 2 Cluster1 False False VM Group 31
Rule 11 Cluster2 True True All VM
Rule_bak Cluster2 True False testVMGroup
Rule_toDel Cluster2 False True VM Group 5</Output>
</Example>
</Examples>
<RelatedLinks>
<RelatedLink>
<LinkText>New-DrsVMToVMHostRule</LinkText>
<LinkUrl />
</RelatedLink>
<RelatedLink>
<LinkText>Remove-DrsVMToVMHostRule</LinkText>
<LinkUrl />
</RelatedLink>
<RelatedLink>
<LinkText>Set-DrsVMToVMHostRule</LinkText>
<LinkUrl />
</RelatedLink>
</RelatedLinks>
<SupportInformation ad="false" rsat="false" ps2="false" ps3="false" ps4="false" ps5="false" wxp="false" wv="false" w7="false" w8="false" w81="false" w2k3s="false" w2k3e="false" w2k3d="false" w2k8s="false" w2k8e="false" w2k8d="false" w2k8r2s="false" w2k8r2e="false" w2k8r2d="false" w2k12s="false" w2k12d="false" w2k12r2s="false" w2k12r2d="false" />
<Publish>false</Publish>
</CmdletObject>
<CmdletObject verb="Get" noun="DrsVMToVMRule">
<Name>Get-DrsVMToVMRule</Name>
<GeneralHelp>
<Synopsis>This cmdlet retrieves the DRS VM to VM rules.</Synopsis>
<Description>This cmdlet retrieves the DRS VM to VM rules.
It returns DRS VM to VM rules that correspond to the filter criteria provided by the cmdlet parameters.
The VM to VM rules can be either affinity- or anti-affinity rules.
The default return type holds more information than the "raw" DRS object that vSphere uses. There is also a switch to allow for just returning said raw DRS object, quite useful for consumption by other cmdlets in this module.</Description>
<Notes />
<InputType />
<InputUrl />
<InputTypeDescription />
<ReturnType>[DRSRule.VMToVMRule];[VMware.Vim.ClusterAffinityRuleSpec];[VMware.Vim.ClusterAntiAffinityRuleSpec]</ReturnType>
<ReturnUrl />
<ReturnTypeDescription>Object with information about the given DRS VM to VM rule, or a raw vSphere object;
</ReturnTypeDescription>
</GeneralHelp>
<ParamSets>
<CommandParameterSetInfo2 Name="__AllParameterSets" Params="Name Cluster ReturnRawRule Verbose Debug ErrorAction WarningAction ErrorVariable WarningVariable OutVariable OutBuffer PipelineVariable" />
</ParamSets>
<Syntax>
<string>Get-DrsVMToVMRule [[-Name] <String>] [[-Cluster] <PSObject[]>] [-ReturnRawRule]</string>
</Syntax>
<Parameters>
<ParameterDescription type="String" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="false" isPos="true" pos="0" globbing="false">
<Name>Name</Name>
<Attributes>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases />
<Description>Name of DRS VM-to-VMHost rule to get (or, all if no name specified)</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="PSObject[]" varLen="true" required="false" dynamic="false" pipeRemaining="false" pipe="true" pipeProp="false" isPos="true" pos="1" globbing="false">
<Name>Cluster</Name>
<Attributes>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases />
<Description>Cluster from which to get DRS VM-to-VMHost rule (or, all clusters if no name specified)</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="SwitchParameter" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="false" isPos="false" pos="named" globbing="false">
<Name>ReturnRawRule</Name>
<Attributes>
<string>System.Management.Automation.ParameterAttribute</string>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
</Attributes>
<Aliases />
<Description>Switch: return DRS VM to VM rule as "raw" VMware.Vim.ClusterVmHostRuleInfo object (contains less info, but useful to other functions that can consume this raw object)</Description>
<DefaultValue />
</ParameterDescription>
</Parameters>
<Examples>
<Example>
<Name>Example 1</Name>
<Cmd>Get-DrsVMToVMRule -Name 'Rule 1*'</Cmd>
<Description>Returns all DRS VM to VM rules with name like 'Rule 1*'</Description>
<Output>Name Cluster Enabled KeepTogether Mandatory VM
---- ------- ------- ------------ --------- --
Rule 1 Cluster1 False False False {VM1, VM2}
Rule 11 Cluster2 True True True {VM3, VM4}</Output>
</Example>
<Example>
<Name>Example 2</Name>
<Cmd>Get-Cluster Cluster2 | Get-DrsVMtoVMHostRule</Cmd>
<Description>Returns all DRS VM to VM rules in Cluster2</Description>
<Output>Name Cluster Enabled KeepTogether Mandatory VM
---- ------- ------- ------------ --------- --
Rule 0 Cluster2 False False False {VM101, VM102}
Rule 11 Cluster2 True True True {VM103, VM014}
Rule_old Cluster2 False True True {VM110, VM111}</Output>
</Example>
</Examples>
<RelatedLinks>
<RelatedLink>
<LinkText>New-DrsVMToVMRule</LinkText>
<LinkUrl />
</RelatedLink>
<RelatedLink>
<LinkText>Remove-DrsVMToVMRule</LinkText>
<LinkUrl />
</RelatedLink>
<RelatedLink>
<LinkText>Set-DrsVMToVMRule</LinkText>
<LinkUrl />
</RelatedLink>
</RelatedLinks>
<SupportInformation ad="false" rsat="false" ps2="false" ps3="false" ps4="false" ps5="false" wxp="false" wv="false" w7="false" w8="false" w81="false" w2k3s="false" w2k3e="false" w2k3d="false" w2k8s="false" w2k8e="false" w2k8d="false" w2k8r2s="false" w2k8r2e="false" w2k8r2d="false" w2k12s="false" w2k12d="false" w2k12r2s="false" w2k12r2d="false" />
<Publish>false</Publish>
</CmdletObject>
<CmdletObject verb="Import" noun="DrsRule">
<Name>Import-DrsRule</Name>
<GeneralHelp>
<Synopsis>Import DRS rules and groups from exported info in JSON</Synopsis>
<Description>This cmdlet creates specified DRS items for the given DRS Clusters. The cmdlet gets the information about the items to create from the exported DRS data generated by the Export-DrsRule cmdlet. The Path parameter is to the JSON file that resutls from Export-DrsRule.
The items recreated include DRS VM groups, DRS VMHost groups, DRS VM to VM rules, and DRS VM to VMHost rules. One can "overwrite" existing groups/rules with the provided -Force parameter.</Description>
<Notes />
<InputType />
<InputUrl />
<InputTypeDescription />
<ReturnType>[DRSRule.VMGroup];[DRSRule.VMHostGroup];[DRSRule.VMToVMHostRule];[DRSRule.VMToVMRule]</ReturnType>
<ReturnUrl />
<ReturnTypeDescription>Object with information about the new DRS VM group;
Object with information about the new DRS VMHost group;
Object with information about the new DRS VM to VMHost rule;
Object with information about the new DRS VM to VM rule</ReturnTypeDescription>
</GeneralHelp>
<ParamSets>
<CommandParameterSetInfo2 Name="__AllParameterSets" Params="Path Name Cluster Force Verbose Debug ErrorAction WarningAction ErrorVariable WarningVariable OutVariable OutBuffer PipelineVariable WhatIf Confirm" />
</ParamSets>
<Syntax>
<string>Import-DrsRule [[-Path] <String>] [[-Name] <String>] [[-Cluster] <PSObject[]>] [-Force] [-WhatIf] [-Confirm]</string>
</Syntax>
<Parameters>
<ParameterDescription type="String" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="false" isPos="true" pos="0" globbing="false">
<Name>Path</Name>
<Attributes>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
<string>System.Management.Automation.ValidateScriptAttribute</string>
<string>System.Management.Automation.ValidateNotNullOrEmptyAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases />
<Description>Filespec of JSON file with exported DRS rule info</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="String" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="false" isPos="true" pos="1" globbing="false">
<Name>Name</Name>
<Attributes>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases />
<Description>Name of rule/group to import, or all if no name specified</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="PSObject[]" varLen="true" required="false" dynamic="false" pipeRemaining="false" pipe="true" pipeProp="false" isPos="true" pos="2" globbing="false">
<Name>Cluster</Name>
<Attributes>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
<string>System.Management.Automation.ValidateScriptAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases />
<Description>Cluster whose exported rules to import, and in which to recreate said rules. If not specified, will import rules from in the JSON file without filtering on cluster</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="SwitchParameter" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="false" isPos="false" pos="named" globbing="false">
<Name>Force</Name>
<Attributes>
<string>System.Management.Automation.ParameterAttribute</string>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
</Attributes>
<Aliases />
<Description>Switch to specify that the import "overwrite" existing groups/rules of same source name in target cluster ($true), or to not import groups/rules if conflict/already existing ($false or not specified). If $false and conflict, error thrown for each conflicting group/rule.
"Overwrite" is accomplished by 0) removal of original group/rule, 1) creation of new group/rule with same name</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="SwitchParameter" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="false" isPos="false" pos="named" globbing="false">
<Name>ShowOnly</Name>
<Attributes>
<string>System.Management.Automation.ParameterAttribute</string>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
</Attributes>
<Aliases />
<Description>Switch to have cmdlet report-only. This is so as to just get the informational objects from the JSON file, with no further action. The filtering of the rules/groups by the specified Name and Cluster still takes place, but then the cmdlet returns the informational objects whose details were retrieved from the given JSON file; no rule/group creation is attempted.</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="SwitchParameter" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="false" isPos="false" pos="named" globbing="false">
<Name>WhatIf</Name>
<Attributes>
<string>System.Management.Automation.ParameterAttribute</string>
<string>System.Management.Automation.AliasAttribute</string>
</Attributes>
<Aliases>
<string>wi</string>
</Aliases>
<Description>Indicates that the cmdlet is run only to display the changes that would be made, and no objects are actually modified</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="SwitchParameter" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="false" isPos="false" pos="named" globbing="false">
<Name>Confirm</Name>
<Attributes>
<string>System.Management.Automation.AliasAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases>
<string>cf</string>
</Aliases>
<Description>If the value is $true, indicates that the cmdlet asks for confirmation before running.
If the value is $false, the cmdlet runs without asking for user confirmation.</Description>
<DefaultValue />
</ParameterDescription>
</Parameters>
<Examples>
<Example>
<Name>Example 1</Name>
<Cmd>Import-DrsRule -Path c:\temp\myDrsRuleInfo_backup.json</Cmd>
<Description>Imports all of the DRS rules/groups whose info is in the given JSON file. The JSON file is of objects exported from the environment via the Export-DrsRule cmdlet.</Description>
<Output>Name Cluster UserCreated VM
---- ------- ----------- --
VM Group 1 Cluster1 True {VM1,VM2}
VM Group 12 Cluster1 True {VM3}
New VM Group 100 Cluster2 True {VM4,VM5,VM6}
...</Output>
</Example>
<Example>
<Name>Example 2</Name>
<Cmd>Import-DrsRule -Path \\fileserver.dom.com\share\myDrsRuleInfo.json -Cluster Cluster0 -Name *hostgr*</Cmd>
<Description>Imports the rules/groups whose name is like "*hostgr*" and whose cluster property is Cluster0. The -Cluster and -Name parameters are used here to narrow the scope of the DRS items that are imported. In this example, that was only one (1) item: a DRS VMHost group.</Description>
<Output>Name Cluster UserCreated VMHost
---- ------- ----------- ------
faveVMHostGroup Cluster0 True {megahost0,megahost1}</Output>
</Example>
<Example>
<Name>Example 3</Name>
<Cmd>Import-DrsRule -Path \\fileserver.dom.com\share\myDrsRuleInfo.json -Cluster Cluster0 -Name *hostgrp0*</Cmd>
<Description>Just get the informational objects with name like "*hostgrp0*" from the JSON file, with no further action. The cmdlet returns the informational objects whose details were retrieved from the given JSON file; no rule/group creation is attempted.</Description>
<Output>Name : hostGrp0
Cluster : Cluster0
VMHost : esxi02,esxi03
VMHostId : {HostSystem-host-621,HostSystem-host-693}
UserCreated : False
Type : ClusterHostGroup
Name : TestVMHostGrp0
Cluster : Cluster0
VMHost : esxi14,esxi15,esxi16
VMHostId : {HostSystem-host-721,HostSystem-host-725,HostSystem-host-729}
UserCreated : True
Type : ClusterHostGroup</Output>
</Example>
</Examples>
<RelatedLinks>
<RelatedLink>
<LinkText>Export-DrsRule</LinkText>
<LinkUrl />
</RelatedLink>
</RelatedLinks>
<SupportInformation ad="false" rsat="false" ps2="false" ps3="false" ps4="false" ps5="false" wxp="false" wv="false" w7="false" w8="false" w81="false" w2k3s="false" w2k3e="false" w2k3d="false" w2k8s="false" w2k8e="false" w2k8d="false" w2k8r2s="false" w2k8r2e="false" w2k8r2d="false" w2k12s="false" w2k12d="false" w2k12r2s="false" w2k12r2d="false" />
<Publish>false</Publish>
</CmdletObject>
<CmdletObject verb="New" noun="DrsVMGroup">
<Name>New-DrsVMGroup</Name>
<GeneralHelp>
<Synopsis>This cmdlet creates a new DRS VM group.</Synopsis>
<Description>This cmdlet creates a new DRS VM group with the provided parameters.</Description>
<Notes />
<InputType />
<InputUrl />
<InputTypeDescription />
<ReturnType>[DRSRule.VMGroup]</ReturnType>
<ReturnUrl />
<ReturnTypeDescription>Object with information about the new DRS VM group</ReturnTypeDescription>
</GeneralHelp>
<ParamSets>
<CommandParameterSetInfo2 Name="__AllParameterSets" Params="Name Cluster VM Force Verbose Debug ErrorAction WarningAction ErrorVariable WarningVariable OutVariable OutBuffer PipelineVariable WhatIf Confirm" />
</ParamSets>
<Syntax>
<string>New-DrsVMGroup [-Name] <String> [-Cluster] <PSObject[]> [-VM] <PSObject[]> [-Force] [-WhatIf] [-Confirm]</string>
</Syntax>
<Parameters>
<ParameterDescription type="String" varLen="false" required="true" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="true" isPos="true" pos="0" globbing="false">
<Name>Name</Name>
<Attributes>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
<string>System.Management.Automation.ValidateNotNullOrEmptyAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases />
<Description>Name of DRS VM Group to create</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="PSObject[]" varLen="true" required="true" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="true" isPos="true" pos="1" globbing="false">
<Name>Cluster</Name>
<Attributes>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
<string>System.Management.Automation.ValidateScriptAttribute</string>
<string>System.Management.Automation.ValidateNotNullOrEmptyAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases />
<Description>Cluster in which to create new group</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="PSObject[]" varLen="true" required="true" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="true" isPos="true" pos="2" globbing="false">
<Name>VM</Name>
<Attributes>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
<string>System.Management.Automation.ValidateScriptAttribute</string>
<string>System.Management.Automation.ValidateNotNullOrEmptyAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases />
<Description>VMs to place in new group.
The VMs can be specified as strings (their names) or as VirtualMachine objects</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="SwitchParameter" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="false" isPos="false" pos="named" globbing="false">
<Name>Force</Name>
<Attributes>
<string>System.Management.Automation.ParameterAttribute</string>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
</Attributes>
<Aliases />
<Description>Switch to specify to "overwrite" existing group of said name in target cluster ($true), or to not create group if conflict/already existing ($false or not specified). If $false and conflict, error thrown for each conflicting group.
"Overwrite" is accomplished by 0) removal of original group, 1) creation of new group with same name</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="SwitchParameter" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="false" isPos="false" pos="named" globbing="false">
<Name>WhatIf</Name>
<Attributes>
<string>System.Management.Automation.ParameterAttribute</string>
<string>System.Management.Automation.AliasAttribute</string>
</Attributes>
<Aliases>
<string>wi</string>
</Aliases>
<Description>Indicates that the cmdlet is run only to display the changes that would be made, and no objects are actually modified</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="SwitchParameter" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="false" isPos="false" pos="named" globbing="false">
<Name>Confirm</Name>
<Attributes>
<string>System.Management.Automation.AliasAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases>
<string>cf</string>
</Aliases>
<Description>If the value is $true, indicates that the cmdlet asks for confirmation before running.
If the value is $false, the cmdlet runs without asking for user confirmation.</Description>
<DefaultValue />
</ParameterDescription>
</Parameters>
<Examples>
<Example>
<Name>Example 1</Name>
<Cmd>New-DrsVMGroup -Name 'My VM Group' -Cluster Cluster1 -VM VM1,VM2</Cmd>
<Description>This will create a new DRS VM group with the name 'My VM Group' on Cluster1.
The DRS VM group will contain the VMs VM1 and VM2.</Description>
<Output>Name Cluster UserCreated VM
---- ------- ----------- --
My VM Group Cluster1 False {VM1,VM2}</Output>
</Example>
</Examples>
<RelatedLinks>
<RelatedLink>
<LinkText>Get-DrsVMGroup</LinkText>
<LinkUrl />
</RelatedLink>
<RelatedLink>
<LinkText>Remove-DrsVMGroup</LinkText>
<LinkUrl />
</RelatedLink>
<RelatedLink>
<LinkText>Set-DrsVMGroup</LinkText>
<LinkUrl />
</RelatedLink>
</RelatedLinks>
<SupportInformation ad="false" rsat="false" ps2="false" ps3="false" ps4="false" ps5="false" wxp="false" wv="false" w7="false" w8="false" w81="false" w2k3s="false" w2k3e="false" w2k3d="false" w2k8s="false" w2k8e="false" w2k8d="false" w2k8r2s="false" w2k8r2e="false" w2k8r2d="false" w2k12s="false" w2k12d="false" w2k12r2s="false" w2k12r2d="false" />
<Publish>false</Publish>
</CmdletObject>
<CmdletObject verb="New" noun="DrsVMHostGroup">
<Name>New-DrsVMHostGroup</Name>
<GeneralHelp>
<Synopsis>This cmdlet creates a new DRS VMHost group.</Synopsis>
<Description>This cmdlet creates a new DRS VMHost group with the provided parameters.</Description>
<Notes />
<InputType />
<InputUrl />
<InputTypeDescription />
<ReturnType>[DRSRule.VMHostGroup]</ReturnType>
<ReturnUrl />
<ReturnTypeDescription>Object with information about the new DRS VMHost group</ReturnTypeDescription>
</GeneralHelp>
<ParamSets>
<CommandParameterSetInfo2 Name="__AllParameterSets" Params="Name Cluster VMHost Force Verbose Debug ErrorAction WarningAction ErrorVariable WarningVariable OutVariable OutBuffer PipelineVariable WhatIf Confirm" />
</ParamSets>
<Syntax>
<string>New-DrsVMHostGroup [-Name] <String> [-Cluster] <PSObject[]> [-VMHost] <PSObject[]> [-Force] [-WhatIf] [-Confirm]</string>
</Syntax>
<Parameters>
<ParameterDescription type="String" varLen="false" required="true" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="true" isPos="true" pos="0" globbing="false">
<Name>Name</Name>
<Attributes>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
<string>System.Management.Automation.ValidateNotNullOrEmptyAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases />
<Description>Name of DRS VMHost Group to create</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="PSObject[]" varLen="true" required="true" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="true" isPos="true" pos="1" globbing="false">
<Name>Cluster</Name>
<Attributes>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
<string>System.Management.Automation.ValidateScriptAttribute</string>
<string>System.Management.Automation.ValidateNotNullOrEmptyAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases />
<Description>Cluster in which to create new group</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="PSObject[]" varLen="true" required="true" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="true" isPos="true" pos="2" globbing="false">
<Name>VMHost</Name>
<Attributes>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
<string>System.Management.Automation.ValidateScriptAttribute</string>
<string>System.Management.Automation.ValidateNotNullOrEmptyAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases />
<Description>The VMHosts that shall be in the new DRS VMHostgroup.
The VMHosts can be given as strings (their names) or as VMHost objects</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="SwitchParameter" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="false" isPos="false" pos="named" globbing="false">
<Name>Force</Name>
<Attributes>
<string>System.Management.Automation.ParameterAttribute</string>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
</Attributes>
<Aliases />
<Description>Switch to specify to "overwrite" existing group of said name in target cluster ($true), or to not create group if conflict/already existing ($false or not specified). If $false and conflict, error thrown for each conflicting group.
"Overwrite" is accomplished by 0) removal of original group, 1) creation of new group with same name</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="SwitchParameter" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="false" isPos="false" pos="named" globbing="false">
<Name>WhatIf</Name>
<Attributes>
<string>System.Management.Automation.ParameterAttribute</string>
<string>System.Management.Automation.AliasAttribute</string>
</Attributes>
<Aliases>
<string>wi</string>
</Aliases>
<Description>Indicates that the cmdlet is run only to display the changes that would be made, and no objects are actually modified</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="SwitchParameter" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="false" isPos="false" pos="named" globbing="false">
<Name>Confirm</Name>
<Attributes>
<string>System.Management.Automation.AliasAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases>
<string>cf</string>
</Aliases>
<Description>If the value is $true, indicates that the cmdlet asks for confirmation before running.
If the value is $false, the cmdlet runs without asking for user confirmation.</Description>
<DefaultValue />
</ParameterDescription>
</Parameters>
<Examples>
<Example>
<Name>Example 1</Name>
<Cmd>New-DrsVMHostGroup -Name 'My ESX' -Cluster Cluster1 -VMHost esx1,esx2</Cmd>
<Description>This will create a new DRS VMHost group with the name 'My ESX' on Cluster1.
The DRS VMHost group will contain the VMHosts esx1 and esx2.</Description>
<Output>Name Cluster UserCreated VM
---- ------- ----------- --
My ESX Cluster1 True {esx1,esx2}</Output>
</Example>
</Examples>
<RelatedLinks>
<RelatedLink>
<LinkText>Get-DrsVMHostGroup</LinkText>
<LinkUrl />
</RelatedLink>
<RelatedLink>
<LinkText>Remove-DrsVMHostGroup</LinkText>
<LinkUrl />
</RelatedLink>
<RelatedLink>
<LinkText>Set-DrsVMHostGroup</LinkText>
<LinkUrl />
</RelatedLink>
</RelatedLinks>
<SupportInformation ad="false" rsat="false" ps2="false" ps3="false" ps4="false" ps5="false" wxp="false" wv="false" w7="false" w8="false" w81="false" w2k3s="false" w2k3e="false" w2k3d="false" w2k8s="false" w2k8e="false" w2k8d="false" w2k8r2s="false" w2k8r2e="false" w2k8r2d="false" w2k12s="false" w2k12d="false" w2k12r2s="false" w2k12r2d="false" />
<Publish>false</Publish>
</CmdletObject>
<CmdletObject verb="New" noun="DrsVMToVMHostRule">
<Name>New-DrsVMToVMHostRule</Name>
<GeneralHelp>
<Synopsis>This cmdlet creates a new DRS VM to VMHost rule.</Synopsis>
<Description>This cmdlet creates a new DRS VM to VMHost rule with the provided parameters.</Description>
<Notes />
<InputType />
<InputUrl />
<InputTypeDescription />
<ReturnType>[DRSRule.VMToVMHostRule]</ReturnType>
<ReturnUrl />
<ReturnTypeDescription>Object with information about the new DRS VM to VMHost rule</ReturnTypeDescription>
</GeneralHelp>
<ParamSets>
<CommandParameterSetInfo2 Name="__AllParameterSets" Params="Name Cluster Enabled Mandatory VMGroupName AffineHostGroupName AntiAffineHostGroupName Force Verbose Debug ErrorAction WarningAction ErrorVariable WarningVariable OutVariable OutBuffer PipelineVariable WhatIf Confirm" />
</ParamSets>
<Syntax>
<string>New-DrsVMToVMHostRule [-Name] <String> [[-Cluster] <PSObject[]>] [-Enabled] [-Mandatory] -VMGroupName <String> [-AffineHostGroupName <String>] [-AntiAffineHostGroupName <String>] [-Force] [-WhatIf] [-Confirm]</string>
</Syntax>
<Parameters>
<ParameterDescription type="String" varLen="false" required="true" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="true" isPos="true" pos="0" globbing="false">
<Name>Name</Name>
<Attributes>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
<string>System.Management.Automation.ValidateNotNullOrEmptyAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases />
<Description>Name of the new DRS VM to VMHost rule to create</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="PSObject[]" varLen="true" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="true" isPos="true" pos="1" globbing="false">
<Name>Cluster</Name>
<Attributes>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
<string>System.Management.Automation.ValidateScriptAttribute</string>
<string>System.Management.Automation.ValidateNotNullOrEmptyAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases />
<Description>Cluster in which to create the new DRS VM to VMHost rule</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="SwitchParameter" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="true" isPos="false" pos="named" globbing="false">
<Name>Enabled</Name>
<Attributes>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
<string>System.Management.Automation.ValidateNotNullOrEmptyAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases />
<Description>A switch indicating if the new DRS VM to VMHost rule shall be enabled</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="SwitchParameter" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="true" isPos="false" pos="named" globbing="false">
<Name>Mandatory</Name>
<Attributes>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
<string>System.Management.Automation.ValidateNotNullOrEmptyAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases />
<Description>Switch to specify if the new DRS VM to VMHost rule is a "should" ($false or not specified) or a "must" ($true) rule</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="String" varLen="false" required="true" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="true" isPos="false" pos="named" globbing="false">
<Name>VMGroupName</Name>
<Attributes>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
<string>System.Management.Automation.ValidateNotNullOrEmptyAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases />
<Description>DRS VM Group to use for new VM-to-VMHost rule</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="String" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="true" isPos="false" pos="named" globbing="false">
<Name>AffineHostGroupName</Name>
<Attributes>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases />
<Description>DRS VMHost Group to use for VM Group to VMHost Group affinity ("run on")</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="String" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="true" isPos="false" pos="named" globbing="false">
<Name>AntiAffineHostGroupName</Name>
<Attributes>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>
<string>System.Management.Automation.ParameterAttribute</string>
</Attributes>
<Aliases />
<Description>DRS VMHost Group to use for VM Group to VMHost Group antiaffinity ("not run on")</Description>
<DefaultValue />
</ParameterDescription>
<ParameterDescription type="SwitchParameter" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="false" isPos="false" pos="named" globbing="false">
<Name>Force</Name>
<Attributes>
<string>System.Management.Automation.ParameterAttribute</string>
<string>System.Management.Automation.ArgumentTypeConverterAttribute</string>