SMB Sessions

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 runas /netonly.

Display your current sessions
net use
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

Or use * instead of \\<HOST> to drop all sessions for your current user.

net use * /del /y