Solved

Automatic Log off via username if possible

Posted on 2006-10-31
5
187 Views
Last Modified: 2010-04-18
I am moving a TERMINAL SERVER between domains and need to preserve contents of the users profiles, i.e. There desktop folder. The way I plan on doing this is via a vb app that will log onto the server under the new domains username and then log off again (just to create the new profile folder) Once that done I will get my app to grab the contents of their profile from the old domian (c:\documents and settings\user.olddomain) to their new profile (c:\documents and settings\username.newdomain)

I have worked out how to automate all of it other than the logoff (tried using send keys...etc) Ideally I want a method of logging them off via username (rather than ts session id as that would mean knowing the session ID First which wouldn't be automated.

Help! :-)
0
Comment
Question by:kinton
  • 2
5 Comments
 
LVL 54

Expert Comment

by:McKnife
ID: 17845238
To automate logoff, you could use the command shutdown -l -f
0
 
LVL 48

Accepted Solution

by:
Jay_Jay70 earned 500 total points
ID: 17846119
or psshutdown from sysinternals has a a logoff switch which works pretty efficiently
0
 
LVL 2

Author Comment

by:kinton
ID: 17994879
Thanks dudes, a fine answer that worked a treat!
0
 
LVL 48

Expert Comment

by:Jay_Jay70
ID: 17999509
glad to hear
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Scenerio: You have a server running Server 2003 and have applied a retail pack of Terminal Server Licenses.  You want to change servers or your server has crashed and you need to reapply the Terminal Server Licenses. When you enter the 16-digit lic…
I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

770 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