?
Solved

Switch between user session via a script

Posted on 2014-02-12
3
Medium Priority
?
1,298 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 40

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article is a collection of issues that people face from time to time and possible solutions to those issues. I hope you enjoy reading it.
In this modest contribution, I want to share with the IT community (especially system administrators, IT Support Engineers and IT Help Desks) about Windows crashes/hangs and how to deal with these particular problems.
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

764 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