I get this error message when I use Invoke-Command to execute a script block on a remote server.
Invoke-Command –Credential (Get-Credential) –ComputerName MyRemoteServer –ScriptBlock {Get-Date}
I set $PSSessionOption.NoMachineProfile=$true to fix the problem before executing Invoke-Command.
$PSSessionOption.NoMachineProfile=$true
Invoke-Command –Credential (Get-Credential) –ComputerName MyRemoteServer –ScriptBlock {Get-Date}