Solved

Switch between user session via a script

Posted on 2014-02-12
3
913 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Synchronize a new Active Directory domain with an existing Office 365 tenant
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

760 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

20 Experts available now in Live!

Get 1:1 Help Now