When it runs it fails with:
'The system detected a possible attempt to compromise security. Please ensure that you can contact the server that authenticated you'
What can I do to make this work please?
First, you're likely running into the "second hop" problem by attempting to have the remote machines contact \\LogServer. See "Secrets of PowerShell Remoting" for a description of the double-hop stuff.
Thanks – I ran your script and it works fine – the computer names are displayed. I thought it might be a CredSSP issue but this script worked before xmas and now doesn't work. The only thing that has changed is that the DCs have been restarted. The DCs are all w2k3 with POSH V2 btw (don't ask!).
Is there any other way to test if it is indeed a double hop issue?
Well I could put a script on all the domain controllers but that's yuck as I'm trying to replace vbscripts on all DCs that are currently doing the job. Just when I thought WinRM is my friend I see that she has some life issues 🙂