Solved

Automatic Log off via username if possible

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

A quick step-by-step overview of installing and configuring Carbonite Server Backup.
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

856 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