当我尝试使用工作流中的 PowerShell 和这样的内联脚本从其他主机远程安装集群时:
workflow CreateClusterCL1 {
$password = "xxx" | ConvertTo-SecureString -asPlainText -Force
$username = "xxxx"
$credential = New-Object System.Management.Automation.PSCredential($username,$password)
inlinescript {
New-Cluster -Name xxx-CL1 -StaticAddress xxx -Node xxx-01, xxx-02, xxx-03, xxx-04 -NoStorage -Force
} -PSComputerName xxx-01.xx.loc -PSCredential $credential
}
我收到此错误:
CategoryInfo : **PermissionDenied**: (:) [New-Cluster], ClusterCmdletException
+ FullyQualifiedErrorId : **UnauthorizedAccess,**Microsoft.FailoverClusters.PowerShell.NewClusterCommand
+ PSComputerName : [xxxx-01.xxxx]
New-Cluster : There was an error adding node 'xxx-03' to the cluster
You do not have administrative privileges on the server 'xxx-03.xxx.LOC'.
Attempted to perform an unauthorized operation.
At CreateClusterCL1:8 char:8
任何想法?