I have two Windows Server 2012 servers with PowerShell version 4 on them. I want one (I’ll call the main) to execute PowerShell commands on the other one (I’ll call target node). I configured the main Windows Server to have an SMB share. I could browse to the share from the target node.
I ran these two lines of PowerShell code on both servers:
set-item WSMAN:\localhost\client\trustedhosts -value *
New-PSSessions -ComputerName FQDNofTargetNode -Credential admin
I was prompted for a password. I entered the password (both times).
I then ran some code that used a SecureString.txt file with the password. This meant I could log in from the first Windows Server into the target node with no prompts. But here is where my problem is. I cannot pull down a file using a configurations from the target node. Here is the .ps1 file that I ran on the target node:
Configuration “rf” {
Node 'guidOfTargetNode" {
File go {
Ensure = “Present”
SourcePath = "\fqdnOfMainServer
DestinationPath = “C:\Temp\cool.txt”
}
}
}
rf -output “.”
I noted the file path that I ran the above PS1 file in. There were no errors when I ran the script above. I then ran this line:
Start-DscConfiguration -Wait -Verbose -Path C:\pathOfPS1fileAbove\rf\
This is what I received: “WinRM cannot process the request. The following error with errorcode 0x8009030e occurred while using Kerberos authentication: A specified logon session does not exist. It may already have been terminated…”
I never used any CheckSum command. Why cannot I run my DSC ps1 script?
I tried the push method. I used the same PS1 file. The Start-DSCConfiguration file was the same except I called out the target node with a -ComputerName flag and corresponding FQDN of the target node. I received this error: “WinRM cannot process the request. The following error with errorcode 0x8009030e occurred while using Kerberos authentication: A specified logon session does not exist. It may already have terminated.” Why would I get this error? Both servers have the same image, same default services, same ports open.