Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Remote Logoff script needed for Win2003

Posted on 2007-10-06
14
Medium Priority
?
1,596 Views
Last Modified: 2008-03-01
I am looking for a VBS script that will remotely FORCED_LOG_OFF or restart w/force, I found a few scripts that worked great on XP and win2k machines, but didn't on Windows 2003.

Thanks a bunch!
0
Comment
Question by:onebulgar
  • 6
  • 3
  • 2
11 Comments
 
LVL 12

Expert Comment

by:chandru_sol
ID: 20029404
Hi,

You can use psshutdown to remote logoff Windows 2003 servers.
You can download the same from here........

http://www.microsoft.com/technet/sysinternals/utilities/psshutdown.mspx

psshutdown /accepteula -f -o \\Computer
0
 
LVL 30

Expert Comment

by:LauraEHunterMVP
ID: 20029773
You can also use qlogoff.exe from www.joeware.net/freetools
0
 

Author Comment

by:onebulgar
ID: 20030725
These are really great suggestions, but I would really like a script for security reasons. The script I can read and modify if needed. However, I can't do the same with these :(
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 30

Accepted Solution

by:
LauraEHunterMVP earned 375 total points
ID: 20030817
0
 

Author Comment

by:onebulgar
ID: 20031124
Yes, that is the exact script that I tried and it didn't work. It had issues with "oSys.Win32ShutDown(5)" line
0
 

Author Comment

by:onebulgar
ID: 20031137
I should add that it worked great on XP, but it didn't go very well with 2003.
0
 
LVL 12

Expert Comment

by:chandru_sol
ID: 20031718
Hi,

As WMI is not enabled by default in Windows 2003 server, can you try enabling WMI as per the link at the bottom and give it a try

http://www.microsoft.com/technet/scriptcenter/resources/qanda/jul05/hey0712.mspx

Can you post the error you are getting?
0
 

Author Comment

by:onebulgar
ID: 20032259
I already tried that but I will try again and will post the results in a few days. I remember that it didn't like the fact that it was Win32ShutDown had a number..."Win32ShutDown(5)"?
0
 

Author Comment

by:onebulgar
ID: 20053584
The error I am getting is:

Scritp: ...\Remote Logoff.vbs
Line: 32
Char: 4
Error: Generic failure
Code: 80041001
Source: SWbemObjectEx

0
 
LVL 12

Expert Comment

by:chandru_sol
ID: 20054141
This works in XP and 2000 Machines and not in Windows 2003 servers. I am looking into it today to see what is going wrong
0
 

Author Comment

by:onebulgar
ID: 21019618
I gave it a B as this didn't fully work on what I needed but I was able to use some of the code to make it work.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

A quick step-by-step overview of installing and configuring Carbonite Server Backup.
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

572 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