Manage SMB sessions on a Windows machine using the
net use command.
Instead of creating a full-blown SMB session, it might sometimes be enough to start a new command prompt with
Display your current sessions
Create a new session
net use \\<HOST> [password] /u:[DOMAIN\]<USERNAME>
If there is a connection from one machine to another with a given user account, you cannot open another SMB session to that same target machine as a different user. See how to drop a session to sidestep this problem.
Delete a session
net use \\<HOST> /del
* instead of
\\<HOST> to drop all sessions for your current user.
net use * /del /y