machineName have tried executing a script using invoke-command in the following way:
Invoke-command -filepath C:\scripts\GettMembers.ps1 -computername "machinename" -credential $Getcredential
But I am getting the following error :
Connecting to remote server failed with the following error message : The WinRM client cannot process the request because the server name cannot be resolved. For more information, see the about_Remote_Troubleshooting Help topic.
But I was able to add the machine to the trusted hosts of the local machine using the following command :
winrm set winrm/config/client `@{TrustedHosts="machineName"}'
Invoke-Command -computername madhsubr-lap.idc.oracle.com ...
? That is, your not really using "machinename", right? :-) Have you tried nslookup on madhsubr-lap.idc.oracle.com?nslookup <remotecomputer>