我无法通过DSC扩展创建故障转移群集。我在Azure上有两个虚拟机,带有Windows 2016 Server和SQL 2016.通过两个虚拟机上的DSC,我安装了以下功能:故障转移群集和RSAT群集(故障转移群集工具),并创建包含每个节点的ip的可信主机记录。 这部分DSC配置失败了:
Script failover
{
SetScript =
{
Invoke-Command -ScriptBlock "new-cluster -name sqlbag2 –Node node1,node2 -StaticAddress 172.16.2.100 -NoStorage –AdministrativeAccessPoint DNS"
}
TestScript = {
#--If no errors return 0 or false
$false
}
GetScript = {
# Do nothing
}
}
在日志中我看到:
Set-TargetResource" on target "Executing the SetScript with the user supplied credential".
VERBOSE: [2016-11-12T14:53:57] [VERBOSE] [NODE2]: LCM: [ End Set ] [[Script]dnssuffixnode1] in 2.6120 seconds.
VERBOSE: [2016-11-12T14:53:58] [ERROR] PowerShell DSC resource MSFT_ScriptResource failed to execute Set-TargetResource
functionality with error message: A positional parameter cannot be found that accepts argument 'ƒ?Node node1,node2
-StaticAddress 172.16.2.100 -NoStorage ƒ?AdministrativeAccessPoint'.
VERBOSE: [2016-11-12T14:53:58] [VERBOSE] [NODE2]: LCM: [ Start Resource ] [[Registry][string]]
VERBOSE: [2016-11-12T14:53:58] [VERBOSE] [NODE2]: LCM: [ Start Test ] [[Registry][string]]
VERBOSE: [2016-11-12T14:53:58] [VERBOSE] [NODE2]: [[Registry][string]] Found registry key value
'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\LocalAccountTokenFilterPolicy' with type 'DWord' and data '1'
VERBOSE: [2016-11-12T14:53:58] [VERBOSE] [NODE2]: LCM: [ End Test ] [[Registry][string]] in 0.3380 seconds.
VERBOSE: [2016-11-12T14:53:58] [VERBOSE] [NODE2]: LCM: [ Skip Set ] [[Registry][string]]
VERBOSE: [2016-11-12T14:53:58] [VERBOSE] [NODE2]: LCM: [ End Resource ] [[Registry][string]]
我做错了什么?