我正在尝试使用以下脚本:
$password = ConvertTo-SecureString "xxxx" -AsPlainText -Force $cred = New-Object System.Management.Automation.PSCredential("domain\Administrator", $password) $session = New-PSSession 192.168.xxx.xxx -Credential $cred Invoke-Command -Session $session -ScriptBlock { New-Cluster -Name "ClusterTest" -Node HOSTNAME }
在Windows Server 2012虚拟机上远程创build群集(用于testing目的)。 我收到以下错误:
An error occurred while performing the operation. An error occurred while creating the cluster 'ClusterTest'. An error occurred creating cluster 'ClusterTest'. No credentials are available in the security package + CategoryInfo : NotSpecified: (:) [New-Cluster], ClusterCmdletException + FullyQualifiedErrorId : New-Cluster,Microsoft.FailoverClusters.PowerShell.NewClusterCommand
我所有其他的远程命令(安装/更改DNS,DHCP,NPAS,GP等)都没有问题。 为什么这个有什么不同? 唯一的区别是在-ScriptBlock标记。 帮帮我!