Quick tip: Log out of a corporate network or network share without logging off your computer

The title of this post might be misleading but I could not find a better way to word it.

Suppose you’re using a virtual machine and you access the corporate network from within it. Normally, the network will ask for your credentials, full with the domain name and username.

What happens however when, after you have provided your credentials, you decide that you want to access another network location as another user (because the current one does not have the right access level)?

You will find that you can’t. The network remembers the credentials you provided the first time and it does not prompt you to change them. It only says you don’t have access to the share.

You could log out the virtual machine and log back in. That way, the network would ask for your credentials again as soon as you tried to access the network share.

However, you will find that the “net use” command is much more convenient. You simply have to run a dos prompt and hit this command: net use

This will list the network shares that you are currently logged into. You can then use the /delete switch to remove the association so that you can start from scratch. For example:

net use “locationYouWantToDisconnectFrom” /DELETE

That will remove any associations (do it for all the locations if you have more than one in the list) and next time that you’ll try to access a network share, the system will ask you for credentials again.

MGR: the Intelogist

About MGR: the Intelogist

SharePoint Server developer, turned Sitefinity developer, turned Angular developer, turned SharePoint Online consultant, turned Unily consultant, turned O365 consultant... Never a dull moment!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

This site uses Akismet to reduce spam. Learn how your comment data is processed.