Quantcast
Channel: PowerShell General
Viewing all articles
Browse latest Browse all 10624

Problems with creating a Windows Server 2008 R2 Failover Cluster Remotely using Powershell

$
0
0

Hi guys,

I am trying to remotely setup a cluster (Windows Server 2008 R2 Failover clustering) from a single central server. So in my scenario, I have 3 servers. My central script server and my 2 cluster nodes. As I run into the double-hop scenario, I have to employ WSManCredSSP. I have managed to get this working for the validate cluster remotely but I am having difficulty creating the cluster remotely. I keep getting the following error when I run the New-Cluster command remotely:

Could not retrieve the network topology for the nodes.
    Security must be initialized before any interfaces are marshalled or unmars
halled. It cannot be changed once initialized
    + CategoryInfo          : NotSpecified: (:) [New-Cluster], ClusterCmdletEx
   ception
    + FullyQualifiedErrorId : New-Cluster,Microsoft.FailoverClusters.PowerShel
   l.NewClusterCommand

As you'll see from my code, I'm no expert when it comes to powershell but I don't see any reason why the create cluster command would not work when the validate (test-cluster) command runs ok. Below is the code. Please note that all the failovercluster windows features have already been installed.

########################################################

Enable-WSManCredSSP -Role Client -Delegate *.testdomain.com -Force$credential = Get-Credential -Credential testdomain\user


$session = New-PSSession -cn testnode1.testdomain.com -Credential $credential -Authentication Credssp
$session2 = New-PSSession -cn testnode2.testdomain.com -Credential $credential -Authentication Credssp

Invoke-Command -Session $session -ScriptBlock {Enable-WSManCredSSP -Role Server -Force}
Invoke-Command -Session $session2 -ScriptBlock {Enable-WSManCredSSP -Role Server -Force}

Invoke-Command -Session $session -ScriptBlock {import-module failoverclusters}
Invoke-Command -Session $session2 -ScriptBlock {import-module failoverclusters}
Invoke-Command -Session $session -ScriptBlock {Test-cluster -Node testnode1.testdomain.com,testnode2.testdomain.com}
Invoke-Command -Session $session -ScriptBlock {New-Cluster -Name testcluster1 -Node testnode1.testdomain.com,testnode2.testdomain.com -StaticAddress 192.168.1.10}

Remove-PSSession $Session
Remove-PSSession $Session2

###################################################

Any help here would be appreciated. Maybe this is not possible but at least knowing this would help. Very little help out there on Net regarding remote cluster installations using powershell. If u have any ideas on what i'm missing here or if you have any alternative ideas on how this remote installation can be done from a single point, any ideas welcome.

Thanks,

R

 


Viewing all articles
Browse latest Browse all 10624

Trending Articles