Checking the windows evetn log was so obvious that I didn't think about it.
While running the script and getting the error, the event has recorded this event (sorry this is in french but I think it is understandable) :
08/06/2015 08:34:20 142 Erreur L'opération WSMan CreateShell a échoué, code d'erreur 5
08/06/2015 08:34:20 254 Information Transfert d'activité
08/06/2015 08:34:20 162 Erreur L'authentification de l'utilisateur a échoué. Les informations d’identification n’ont pas fonctionné.
When I dig into the authentication error information I can see that the user listed is ITEM-81502\efibtf. This is the local user (with admin rights) that I am using to run the configuration script.
On the Control Machine I am using the same user but without the computer prefix and it works fine.
Maybe I should run the script as admin instead of running it as an user with admin rights ?
Otherwise, do you have any idea how can I manage to authenticate without having the user prefixed with the computer name ?