Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Switch between user session via a script

Posted on 2014-02-12
3
Medium Priority
?
1,410 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 41

Accepted Solution

by:
footech earned 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
Know the reasons and solutions to move/import EDB to New Exchange Server. Also, find out how to recover an Exchange .edb file and to restore the file back.
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.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

598 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