
Solution: Start the service WinRM with WMI
function StartWinRM
{
Param([string] $Computer,
[System.Management.Automation.PSCredential] $Credential)
$service = Get-WmiObject -ComputerName $Computer -Credential $Credential -Class Win32_Service -Filter "Name='WinRM'"
$service.StartService()
}