Solved

Automatic Log off via username if possible

Posted on 2006-10-31
5
185 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 53

Expert Comment

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

Accepted Solution

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

Author Comment

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

Expert Comment

by:Jay_Jay70
Comment Utility
glad to hear
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

The HP utility "HP Lights-Out Online Configuration Utility for Windows Server 2003/2008" could be of great use when it comes to remotely configure a HP servers ILO WITHOUT rebooting the server. We would only need to create and run scripts using thi…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 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

12 Experts available now in Live!

Get 1:1 Help Now