Fix Invoke-Command missing error on session termination.
#11586
Merged
Invoke-Command missing error on session termination.
#11586