I am working on a remote machine from my desktop and I have the following script: < Blockquote>
come-command - password name $ name-authentication default -activation $ creds1 -scriptblock {net use \ $ share password / user: other domain \ other user}
Then I get a specified logon session does not exist. It may have been terminated already, this thing is disappointing because if I run the You have to pass the variable pure use \\ share $ password2 / user: otherdomain \ otheruser it works perfectly on a remote machine Is there any remedy or am I missing something?
$ password2 in the script block, otherwise its value Empty:
come-command-computer $ name ... -scriptblock {use net \\ host \ share $ args [0] / user: otherdomain \ other user} -registration $ Password 2
No comments:
Post a Comment