

After checking for the above issues, try the following: -Check the Event Viewer for events related to authentication. The client and remote computers are in different domains and there is no trust between the two domains. The Service Principal Name (SPN) for the remote computer name and port does not exist. Kerberos accepts domain user names, but not local user names. Kerberos is used when no authentication method and no user name are specified. Possible causes are: -The user name or password specified are invalid. The following error with errorcode 0x80090322 occurred while using Kerberos authentication: An unknown security error occurred. Connecting to remote server Lxxxx failed with the following error message : WinRM cannot process the request. Store failure computer namesin a variable to try later, if pass then continue - NOTE: Perhaps I should use -Quiet here to just get back a boolean result?Ģ) I then need to check I can actually access the computer using PS Remoting as had some cases where get error below due to firewall config or because they are on a public network - these are things I can easily fix when I know which computers are affected - but no point in trying to copy a file if can't even connect etc - so handy to store failure computer names in another variable which I can sort later, and if connect okay to continue

I will explain the requirements first so you can see what I am doing. Hi, I would like some advice/help on improving the script below which was written with help on another forum.
