It just doesn't work when I connect to machine 1 and within the Remote Session try. When I run the OpenRemoteBaseKey Command on my Laptop with Credentials of the Domain Admin I can successfully read the registry of Remote Systems.
OpenRemoteBaseKey will use the implicit credentials of the running user, establishing the connection using IPC If you need to prompt and use single creds, then you'll need to define those outside the foreach loop.