PowerShell Remoting: No credentials are available in the security package
- by TheSciz
I'm trying to use the following script:
$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 }
To remotely create a cluster (it's for testing purposes) on a Windows Server 2012 VM. I'm getting the following error:
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
All of my other remote commands (installing/making changes to DNS, DHCP, NPAS, GP, etc) work without an issue. Why is this one any different? The only difference is in the -ScriptBlock tag. Help!