解决了

new-ntnxprotectiondomain用法/文档


徽章 +5
我正在尝试保护域CMDLET,并尝试使用New-NtnxProtectionDomain。我遇到了一些问题,希望周围有人指向我的正确方向。

当我在没有任何参数的情况下运行它时,new-ntnxProtectionDomain打印“ protectionDomainName不能为null”,但是似乎不存在参数protectionDomainName。

new-ntnxprotectiondomainprotectrydomainname不能为null
帮助没有显示如何使用cmdlet:

获得新的ntnxprotectiondomain -fullnamenew-ntnxprotectiondomainsynopsIsAddd a保护域。syntaxDescriptionParametersistersistersistersisterscmdlet支持公共参数:冗长,调试,错误,错误,错误,警告性,警告性,可警告,可疑,Outbuffer,pipelineVarable和Outvararia-Outvararia。有关更多信息,请参见有关_CommonParameters(http://go.microsoft.com/fwlink/?linkid=113216)。InputsOutputsracsraced链接
IntelliSense提供了更多信息,但没有任何类似于“ protectionDomainName”的信息:

图标

最好的答案CBROWN2014年8月28日,18:04

\n
\nI 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:
\n
\nconnect-nutanixcluster [CVM_IP]
\n
\nAnd then
\n
\n$n = Get-NutanixClusterNew-NTNXProtectionDomain -Input testDomain -NutanixClusters $n
\n
\nor:
\n
\nNew-NTNXProtectionDomain -Input testDomain2 -Servers [CVM_IP]
\n
\nNow we can see the PDs created:
\n
\nGet-NTNXProtectionDomain -name testDomain
\n
\nname : testDomain
\n
\nGet-NTNXProtectionDomain -name testDomain2
\n
\nname : testDomain2
\n
\nI'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.","className":"post__content__best_answer"}">
查看原件

该主题已关闭以供评论

2个答复

UserLevel 3
徽章 +15
嘿,科恩,

我只是在实验室里进行了一些测试,看来CMDLET使用-Input标志来protectionDomainName。它也不接受没有标志的PD名称。这是我在实验室里运行的内容:

连接nutanixCluster [CVM_IP]

接着

美元

或者:

new -ntnxprotectiondomain -iut TestDomain2 -Servers [CVM_IP]

现在我们可以看到创建的PD:

get -ntnxprotectiondomain-名称测试域

名称:测试域

get -ntnxprotectiondomain -name TestDomain2

名称:TestDomain2

我将对此提交错误,标志应该更直观(拥有-name标志会好得多),但是与此同时,输入应该有效。
徽章 +5
@cbrown感谢您的透彻答复。
Learn more about our cookies.<\/a>","cookiepolicy.button":"Accept cookies","cookiepolicy.button.deny":"Deny all","cookiepolicy.link":"Cookie settings","cookiepolicy.modal.title":"Cookie settings","cookiepolicy.modal.content":"We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.<\/a>","cookiepolicy.modal.level1":"Basic
Functional","cookiepolicy.modal.level2":"Normal
Functional + analytics","cookiepolicy.modal.level3":"Complete
Functional + analytics + social media + embedded videos"}}}">
Baidu