psShutdown help, please.

Oct 29, 2004
33
0
0
I'm trying to set up a scheduled task on my pc (WinXP Pro) to run psshutdown and log the current console user off of a remote pc (WinXP Pro) in a SBS 2003 domain. Here's my command line. It isn't doing anything but pulling up the same thing that you get when you type psshutdown -?.

There's not much in the way of help that I could find. Anyone have ideas on what I'm doing wrong?

psshutdown -f -o -m "Your session has expired. You are being logged off. Dad" -u {admin_user} -p {admin_pwd} -n 90 \\brennie

Here's the "help" for the command:

usage: psshutdown [[\\computer[,computer[,..] | @file [-u user [-p psswd]]] -s|-r|-h|-d|-k|-a|-l|-o [-f] [-c] [-t nn|h:m] [-n s] [-e [u|p]:xx:yy] [-m "message"]

-? Displays the supported options.
computer Perform the command on the remote computer or computers specified. If you omit the computer name the command runs on the local system, and if you specify a wildcard (\\*), the command runs on all computers in the current domain.
@file Run the command on each computer listed in the text file specified.
-u Specifies optional user name for login to remote computer.
-p Specifies optional password for user name. If you omit this you will be prompted to enter a hidden password.
-a Aborts a shutdown (only possible while a countdown is in progress)
-c Allow the shutdown to be aborted by the interactive user
-d Suspend the computer
-e Shutdown reason code.
Specify 'u' for user reason codes and 'p' for planned shutdown reason codes.
xx is the major reason code (must be less than 256)
yy is the minor reason code (must be less than 65536)
-f Forces all running applications to exit during the shutdown instead of giving them a chance to gracefully save their data
-h Hibernate the computer
-k Poweroff the computer (reboot if poweroff is not supported)
-l Lock the computer
-m This option lets you specify a message to display to logged-on users when a shutdown countdown commences
-n Specifies timeout in seconds connecting to remote computers
-o Logoff the console user
-r Reboot after shutdown
-s Shutdown without poweroff
-t Specifies the countdown in seconds until the shutdown (default: 20 seconds) or the time of shutdown (in 24 hour notation)
 

tyanni

Senior member
Sep 11, 2001
608
0
76
I don't have experience with this, but my understanding from the help is that \\* is the wildcard. You can't have \\brennie, because that is not a wildcard. However, this is amazingly stupid if its the case. Maybe someone else here has more info?
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
Originally posted by: tyanni
I don't have experience with this, but my understanding from the help is that \\* is the wildcard. You can't have \\brennie, because that is not a wildcard. However, this is amazingly stupid if its the case. Maybe someone else here has more info?

The help clearly says you can have \\computername. If you don't it's local system, if you use \\* it's all, or you can specify a list of names e.g. \\comp1,\\com2...

As for the original poster, try listing the arguments in the order help is telling you to (e.g. the computer name must go first, not last)

Bill
 
Oct 29, 2004
33
0
0
The help file has them in one order (which I've tried), and when the system pulls up help it's in another order (which I've tried).
 
Oct 29, 2004
33
0
0
Originally posted by: Winchester
Terminal Services Manager?

Find the computer, right click on user, click reset?


They're not in on a Terminal Service session. They're logged onto the local workstation, while sitting in front of it. I want this to be an automatic log off based on a Scheduled Task that runs when their logon hours have expired.