デスクトップからリモート マシンで作業しており、次のスクリプトがあります。
Invoke-Command -computername $name -authentification default -credential $creds1 -scriptblock {net use \share $password2 /user:otherdomain\otheruser}
次に、指定されたログオン セッションが存在しません。すでに終了している可能性があります。net use \\share $password2 /user:otherdomain\otheruser
リモートマシンで直接実行すると完全に機能するため、これはイライラします。回避策はありますか、それとも何か見逃しましたか?