Solved

Switch between user session via a script

Posted on 2014-02-12
3
952 Views
Last Modified: 2014-02-12
Hi, is there a way in windows 7 to create a script that will allow me to switch between two user sessions.

My situation is, On XP I used to have 2 PC's on my desk, one logged on with my normal domain user account and the second PC with my domain admin account.

 Now that I am using Win7 Id like to only use on PC with a session from each user and switch between them with as little required clicks as possible as I have to switch about 40x a day and its annoying to go via "alt + control + del" and click and enter the username and password manually routine every time.

Is there perhaps a way\method to go with a vbscript or powershell that when executed switches to a defined user account and only requires me to enter the password or is this in general do to the security limitations not possible at all and not worth to spent more time on?
0
Comment
Question by:David
  • 2
3 Comments
 
LVL 39

Accepted Solution

by:
footech earned 500 total points
ID: 39854240
I wasn't aware of a way to do this until you asked.
This link has some details.
http://www.nextofwindows.com/windows-7-8-quick-tip-how-to-switch-user-from-a-command-line/
After a startup you need to log on to one account, then switch user to your other account.
Now open a command prompt and run "quser" (could also use "qwinsta").  This will list your sessions and their ID.  To switch to another session run
tscon x /password:*
where "x" is the session ID (number) that you want to switch to.  You could also specify the password in the command instead of using "*", but this is more secure.
0
 

Author Comment

by:David
ID: 39854459
This is exactly what I was looking for, thank you, I will test tomorrow in the office
0
 

Author Closing Comment

by:David
ID: 39855495
Thank you, worked perfectly!
0

Featured Post

Make managing Office 365 email signatures a breeze

Are you using Office 365? Having trouble trying to set up email signatures for your users? Getting stressed out managing multiple signatures? Need an easier way to manage? We have a solution for you, try the most-user friendly and powerful signature management tool on the market.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
How to record audio from input sources to your PC – connected devices, connected preamp to record vinyl discs, streaming media, that play through your audio card: Vista, Windows 7, Windows 8, Windows 8.1 and Windows 10 – both 32 bit & 64.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now