New-NTNXProtectionDomain usage/documentation | Nutanix Community
Skip to main content
Solved

New-NTNXProtectionDomain usage/documentation

  • August 26, 2014
  • 2 replies
  • 998 views

koen
Forum|alt.badge.img+5
  • Voyager
  • 2 replies
I am experimenting with the Protection Domain Cmdlets and trying to use New-NTNXProtectionDomain. I am running into some issues and I hope there is someone around to point me in the right direction.

New-NTNXProtectionDomain prints "protectionDomainName cannot be null" when I run it without any parameters, but the parameter protectionDomainName doesn't seem to exist.

New-NTNXProtectionDomainprotectionDomainName cannot be null
The help doesn't show how to use the Cmdlet:

Get-Help New-NTNXProtectionDomain -fullNAMENew-NTNXProtectionDomainSYNOPSISAdd a Protection Domain.SYNTAXDESCRIPTIONPARAMETERSThis cmdlet supports the common parameters: Verbose, Debug,ErrorAction, ErrorVariable, WarningAction, WarningVariable,OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). INPUTSOUTPUTSRELATED LINKS
Intellisense gives some more info, but nothing that resembles "protectionDomainName":

Best answer by cbrown

Hey Koen,

I just ran some tests in the lab here, and it seems that the cmdlet uses the -Input flag for protectionDomainName. It also doesn't accept the PD Name without the flag, which it should. Here's what I ran in my lab:

connect-nutanixcluster [CVM_IP]

And then

$n = Get-NutanixClusterNew-NTNXProtectionDomain -Input testDomain -NutanixClusters $n

or:

New-NTNXProtectionDomain -Input testDomain2 -Servers [CVM_IP]

Now we can see the PDs created:

Get-NTNXProtectionDomain -name testDomain

name : testDomain

Get-NTNXProtectionDomain -name testDomain2

name : testDomain2

I'm going to file a bug on this, the flag should be more intuative (having a -name flag would be much better), but in the mean time -input should work.
View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

2 replies

cbrown
Nutanix Employee
Forum|alt.badge.img+15
  • Nutanix Employee
  • 24 replies
  • Answer
  • August 28, 2014
Hey Koen,

I just ran some tests in the lab here, and it seems that the cmdlet uses the -Input flag for protectionDomainName. It also doesn't accept the PD Name without the flag, which it should. Here's what I ran in my lab:

connect-nutanixcluster [CVM_IP]

And then

$n = Get-NutanixClusterNew-NTNXProtectionDomain -Input testDomain -NutanixClusters $n

or:

New-NTNXProtectionDomain -Input testDomain2 -Servers [CVM_IP]

Now we can see the PDs created:

Get-NTNXProtectionDomain -name testDomain

name : testDomain

Get-NTNXProtectionDomain -name testDomain2

name : testDomain2

I'm going to file a bug on this, the flag should be more intuative (having a -name flag would be much better), but in the mean time -input should work.

koen
Forum|alt.badge.img+5
  • Author
  • Voyager
  • 2 replies
  • September 3, 2014
@cbrown Thanks for your thorough reply.