当我尝试在工作流程中使用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
任何想法?