I am stuck with a very specific problem:
- Driver script on a Server in organization domain - uses delegated creds based on user login
- Target VM - not on organization domain - different local credentials that need to be passed
- Shared network drive with data that should be accessible to ‘2’ - same credentials as ‘1’
What I need to do:
- Trigger Driver script from Server that is on domain
- Revert the Target VM to some existing snapshot (using PowerCLI)
- Map a drive on Target VM - using the domain related credentials
- Execute some powershell scripts placed on shared network drive (this internally accesses some .dat and .bin files on the same location)
I am unable to connect to the Target VM with Invoke-Command to execute the drive map script.
Error: WinRM cannot process the request. The following error with errorcode 0x8009030e occurred while using
Negotiate authentication: A specified logon session does not exist. It may already have been terminated.
-Kerberos accepts domain user names, but not local user names.
But I do not have any domain user names, as the VM is not on domain
What I have tried:
- Invoke-Command with script path in ScriptBlock
- Adding the drive map as a startup script on logon - this however does not work unless I manually login to Target VM after each snapshot revert
- PSRemoting is enabled on both driver and target VMs
- The IPs are added as trusted hosts on both
- WinRM is configured to process requests
- ExecutionPolicy is Unrestricted
- Firewall disabled
Will be wonderful if anyone can help me with this!