Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > script to log off users from server

Reply
Thread Tools Display Modes

script to log off users from server

 
 
Sue
Guest
Posts: n/a

 
      03-29-2009
hello. Also thankyou Pegasus for your last script.
I need a script to log off users from my SBS 2003 server. I have told them
they have to do it, but sometimes they forget.
A little info about the server
users folders are redirected to the server.


 
Reply With Quote
 
 
 
 
Sue
Guest
Posts: n/a

 
      03-29-2009
I found psshutdown.exe and the command, just wondering if there is another
way.
"Sue" <> wrote in message
news:...
> hello. Also thankyou Pegasus for your last script.
> I need a script to log off users from my SBS 2003 server. I have told them
> they have to do it, but sometimes they forget.
> A little info about the server
> users folders are redirected to the server.
>



 
Reply With Quote
 
Pegasus [MVP]
Guest
Posts: n/a

 
      03-29-2009

"Sue" <> wrote in message
news:...
> hello. Also thankyou Pegasus for your last script.
> I need a script to log off users from my SBS 2003 server. I have told them
> they have to do it, but sometimes they forget.
> A little info about the server
> users folders are redirected to the server.


Have a look at the native shutdown.exe command.


 
Reply With Quote
 
Lanwench [MVP - Exchange]
Guest
Posts: n/a

 
      03-29-2009
Pegasus [MVP] <> wrote:
> "Sue" <> wrote in message
> news:...
>> hello. Also thankyou Pegasus for your last script.
>> I need a script to log off users from my SBS 2003 server. I have
>> told them they have to do it, but sometimes they forget.
>> A little info about the server
>> users folders are redirected to the server.

>
> Have a look at the native shutdown.exe command.


....but note that if users have open files, they'll lose changes.
As a wise man said, "There are seldom good technological solutions to
behavioral problems."


 
Reply With Quote
 
Pegasus [MVP]
Guest
Posts: n/a

 
      03-29-2009

"Lanwench [MVP - Exchange]"
< hoo.com> wrote in message
news:%...
> Pegasus [MVP] <> wrote:
>> "Sue" <> wrote in message
>> news:...
>>> hello. Also thankyou Pegasus for your last script.
>>> I need a script to log off users from my SBS 2003 server. I have
>>> told them they have to do it, but sometimes they forget.
>>> A little info about the server
>>> users folders are redirected to the server.

>>
>> Have a look at the native shutdown.exe command.

>
> ...but note that if users have open files, they'll lose changes.
> As a wise man said, "There are seldom good technological solutions to
> behavioral problems."


Well said . . . but are you sure it wasn't a wise woman who said it? :-)


 
Reply With Quote
 
Al Dunbar
Guest
Posts: n/a

 
      03-29-2009

"Pegasus [MVP]" <> wrote in message
news:%...
>
> "Lanwench [MVP - Exchange]"
> < hoo.com> wrote in
> message news:%...
>> Pegasus [MVP] <> wrote:
>>> "Sue" <> wrote in message
>>> news:...
>>>> hello. Also thankyou Pegasus for your last script.
>>>> I need a script to log off users from my SBS 2003 server. I have
>>>> told them they have to do it, but sometimes they forget.
>>>> A little info about the server
>>>> users folders are redirected to the server.
>>>
>>> Have a look at the native shutdown.exe command.

>>
>> ...but note that if users have open files, they'll lose changes.
>> As a wise man said, "There are seldom good technological solutions to
>> behavioral problems."

>
> Well said . . . but are you sure it wasn't a wise woman who said it? :-)


ROFLOL!

/Al

PS: not funny because one might think that a "wise woman" was an oxymoron,
but because one wise woman (or wise wench, as it were) neglected to make
such an insightful point herself!


 
Reply With Quote
 
Lanwench [MVP - Exchange]
Guest
Posts: n/a

 
      03-30-2009
Pegasus [MVP] <> wrote:
> "Lanwench [MVP - Exchange]"
> < hoo.com> wrote in
> message news:%...
>> Pegasus [MVP] <> wrote:
>>> "Sue" <> wrote in message
>>> news:...
>>>> hello. Also thankyou Pegasus for your last script.
>>>> I need a script to log off users from my SBS 2003 server. I have
>>>> told them they have to do it, but sometimes they forget.
>>>> A little info about the server
>>>> users folders are redirected to the server.
>>>
>>> Have a look at the native shutdown.exe command.

>>
>> ...but note that if users have open files, they'll lose changes.
>> As a wise man said, "There are seldom good technological solutions to
>> behavioral problems."

>
> Well said . . . but are you sure it wasn't a wise woman who said it?
> :-)


Nope. It was the inimitable Mr. Ed Crowley of fame, myth and lore.


 
Reply With Quote
 
Lanwench [MVP - Exchange]
Guest
Posts: n/a

 
      03-30-2009
Al Dunbar <> wrote:
> "Pegasus [MVP]" <> wrote in message
> news:%...
>>
>> "Lanwench [MVP - Exchange]"
>> < hoo.com> wrote in
>> message news:%...
>>> Pegasus [MVP] <> wrote:
>>>> "Sue" <> wrote in message
>>>> news:...
>>>>> hello. Also thankyou Pegasus for your last script.
>>>>> I need a script to log off users from my SBS 2003 server. I have
>>>>> told them they have to do it, but sometimes they forget.
>>>>> A little info about the server
>>>>> users folders are redirected to the server.
>>>>
>>>> Have a look at the native shutdown.exe command.
>>>
>>> ...but note that if users have open files, they'll lose changes.
>>> As a wise man said, "There are seldom good technological solutions
>>> to behavioral problems."

>>
>> Well said . . . but are you sure it wasn't a wise woman who said it?
>> :-)

>
> ROFLOL!
>
> /Al
>
> PS: not funny because one might think that a "wise woman" was an
> oxymoron, but because one wise woman (or wise wench, as it were)
> neglected to make such an insightful point herself!


Ptui. I'm just an idiot who can google real fast. ;-)


 
Reply With Quote
 
Revenger
Guest
Posts: n/a

 
      03-31-2009
On Sat, 28 Mar 2009 20:30:09 -0700, Sue wrote:

> hello. Also thankyou Pegasus for your last script.
> I need a script to log off users from my SBS 2003 server. I have told them
> they have to do it, but sometimes they forget.
> A little info about the server
> users folders are redirected to the server.


Try this batch file ... I wrote it for a coleague of mine who had to
disconnect RDP sessions to make a backup:

echo off
FOR /F "usebackq delims== " %%i IN (`"query session | find "rdp-tcp#""`) DO
logoff %%i

You have to run this from the console session ... It will disconnect all
users except the one where the script is running from.

--
Pozdrav

Jednom su izmislili papir po imenu Chuck Norris, ali papir nije dopuštao da
itko sere po njemu !
 
Reply With Quote
 
Sue
Guest
Posts: n/a

 
      04-02-2009
I don't think that last script would work, becuase the users are going in
from the lan, not remote.
"Revenger" <> wrote in message
news:cc7e5ymdxe5b$.18r2gra14crvx$... .
> On Sat, 28 Mar 2009 20:30:09 -0700, Sue wrote:
>
>> hello. Also thankyou Pegasus for your last script.
>> I need a script to log off users from my SBS 2003 server. I have told
>> them
>> they have to do it, but sometimes they forget.
>> A little info about the server
>> users folders are redirected to the server.

>
> Try this batch file ... I wrote it for a coleague of mine who had to
> disconnect RDP sessions to make a backup:
>
> echo off
> FOR /F "usebackq delims== " %%i IN (`"query session | find "rdp-tcp#""`)
> DO
> logoff %%i
>
> You have to run this from the console session ... It will disconnect all
> users except the one where the script is running from.
>
> --
> Pozdrav
>
> Jednom su izmislili papir po imenu Chuck Norris, ali papir nije dopuštao
> da
> itko sere po njemu !



 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
script to log # of users login/disconnect on a terminal server John Scripting 0 03-29-2006 09:42 PM
Script that determines Terminal Server Active & Disconnected users Spin Scripting 2 03-01-2006 01:31 PM
script to copy a shortcut from a location on our server to the all users desktop and all users start menu Woody Scripting 1 11-19-2005 02:24 PM
Re: welcome script on Windows 2003 Server when users log on Chris Dugan Scripting 0 08-26-2005 10:08 PM
Script not working correctly for users w/out admin rights to the server Jerry Scripting 4 06-13-2004 01:59 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59