Windows PowerShell cannot close the remote session properly. The session is in an undefined state because it was not opened ...

Windows PowerShell cannot close the remote session properly. The session is in an undefined state because it was not opened or connected after being disconnected. Windows PowerShell will try to force the session to close on the local computer, but the session might not be closed on the remote computer. To close a remote session properly, first open it or connect it.