0

I have a Windows cluster provisioning script. I am not able to execute the New-Cluster command as Administrator. It says that the user should be a domain user to be able to execute the command.

I m trying to use PSExec to login as a domain user and try if the command is working, but still with no success.

C:\Users\Administrator\Desktop\PSTools\PsExec.exe -s -u name -p "pass" -accepteula cmd /c "powershell  -noprofile & { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"C:\scripts\cluster-config.ps1`" " -Verb RunAs; exit }"

(I have passed the params correctly while executing)

The cluster-config.ps1

param(
[Parameter(Mandatory=$true)][string]$clusterName,
[Parameter(Mandatory=$true)][string]$srv1,
[Parameter(Mandatory=$true)][string]$srv2,
[Parameter(Mandatory=$true)][string]$clusterIP
)

#Create and configure the WinCluster
New-Cluster -Name $clusterName -Node $srv1,$srv2 -StaticAddress $clusterIP -AdministrativeAccessPoint ActiveDirectoryAndDns

How can I create a Windows Cluster as ad Administrator? Unfortunately direct login with domain user credentials is not possible.

Drifter104
  • 3,693
  • 2
  • 22
  • 39
Vini
  • 111
  • 1
  • 5

1 Answers1

0

No:

  1. New-Cluster doesn't need to be run on the actual cluster node.

  2. New-Cluster creates AD objects and DNS records. You will need an AD authentication

  3. New-Cluster cannot be run remotely without Credential Security Service Provider (CredSSP) authentication on the server computer.

And without knowing more about your situation, I can't really make better recommendations, but consider working with your AD admins to prestage clusters and nodes

Cpt.Whale
  • 297
  • 1
  • 10