Solved

Logoff Domain users

Posted on 2013-01-21
7
337 Views
Last Modified: 2013-02-24
Is it possible to have users automatically logged off  a Computer,  If they try to log on another computer in the domain.


EG. I am working on Computer A. I move to another Computer in the office Computer B.

Is there a script/Group Policy, that will force Computer A to logoff before letting me log onto Computer B?


So any user can only be logged onto the domain once at any given time.

Cheers.
0
Comment
Question by:PowersMackay
  • 3
  • 3
7 Comments
 
LVL 6

Expert Comment

by:Alan Gunn
ID: 38803794
It sounds like you would need a login script that records the current machine name in a file on the users home folder.

When the user logs in, it compares the current machine name with that recorded machine name and if it's different, executes a "Logoff" command on the other machine, then updates the stored value with the current machine name.

Do you currently have a login script and is it written in VBScript?
0
 

Author Comment

by:PowersMackay
ID: 38803810
I only have a few very simple .bat scripts
For map network drives and printers.
Along with Roaming profiles set however I have never done any VBScripting before to be honest.

Do you know of any sites that might offer examples.
0
 
LVL 6

Assisted Solution

by:Alan Gunn
Alan Gunn earned 500 total points
ID: 38803834
I found a script that logs a user off another computer using WMI at this site.

http://www.sevenforums.com/network-sharing/162047-remote-logoff-users.html

strComputer= InputBox( "Enter Machine Name/IP Address here..." )
Set objWMI = GetObject("winmgmts:{(Shutdown)}\\" + strComputer + "\root\cimv2")
Set colOperatingSystems = objWMI.ExecQuery("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
ObjOperatingSystem.Win32Shutdown(0)
Next

Open in new window


If you havent done any VBScript (And even is you have! ;-) ) WMI can be pretty ureadable.
There is also PSSshutdown, also mentioned in the above article, that is available as part of PSTools, a free download from Microsoft.
0
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!

 
LVL 6

Accepted Solution

by:
Alan Gunn earned 500 total points
ID: 38803845
Hi!
Found the Microsoft description of the things you can do with line 5, Win32Shutdown.

http://msdn.microsoft.com/en-gb/library/windows/desktop/aa394058(v=vs.85).aspx

Cheers!
TRM
0
 

Author Comment

by:PowersMackay
ID: 38803849
Thanks for your help. I will start doing some tuts from http://www.w3schools.com and learn some VBScript.


I have done C++ long ago, however always managed to avoid VBScript.

Thank you.
0
 
LVL 53

Expert Comment

by:McKnife
ID: 38805245
Hi.

Look at this solution to similar task: http://technet.microsoft.com/en-us/magazine/2005.05.utilityspotlight.aspx
Quote: Ever needed to limit concurrent user logins in an Active Directory® domain? Ever wanted to keep track of information about every login in a domain? If so, LimitLogin is for you.
0
 

Author Closing Comment

by:PowersMackay
ID: 38923927
This has made my job a lot easier
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I was supporting a handful of Windows 2008 (non-R2) 2 node clusters with shared quorum disks. Some had SQL 2008 installed and some were just a vendor application that we supported. For the purposes of this article it doesn’t really matter which so w…
You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…

706 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

18 Experts available now in Live!

Get 1:1 Help Now