| Author | Messages | |
dharding
Posts:24
 | | 12/13/2005 10:35 AM |
| I™m using the following script to logoff a workstation.
It works fine on XP workstations but does not seem to work on Windows 2000/2003
servers. Any Ideas?
Set objSystemSet =
GetObject("winmgmts:{impersonationLevel=impersonate,(Shutdown)}").InstancesOf("Win32_OperatingSystem")
For Each objSystem In objSystemSet
objSystem.Win32Shutdown 0
Next
Devon Harding
Windows Systems Engineer
Southern Wine & Spirits
- BSG
954-602-2469
__________________________________This message and any attachments are solely for the intended recipientand may contain confidential or privileged information. If you are notthe intended recipient, any disclosure, copying, use or distribution ofthe information included in the message and any attachments isprohibited. If you have received this communication in error, pleasenotify us by reply e-mail and immediately and permanently delete thismessage and any attachments. Thank You. | | | |
| dharding
Posts:24
 | | 12/14/2005 1:25 AM |
| This script is part of a another script
that upon logon, checks certain registry values, then if the values are not
set, the script then sets the value and logoff the current user. Like I said
before, it works on Windows XP but not servers. Why?
From:
ActiveDir-owner@xxxxxxxxxxxxxxxxxx [mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of Steve Shaff
Sent: Tuesday, December 13, 2005
7:38 PM
To: ActiveDir@xxxxxxxxxxxxxxxxxx
Subject: RE: [ActiveDir]
Win32Shutdown Method & Win2003
The shutdown command
works. Give that a shot.
S
From:
ActiveDir-owner@xxxxxxxxxxxxxxxxxx [mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of Harding,
Devon
Sent: Tuesday, December 13, 2005
2:34 PM
To: ActiveDir@xxxxxxxxxxxxxxxxxx
Subject: [ActiveDir] Win32Shutdown
Method & Win2003
I™m using the following script
to logoff a workstation. It works fine on XP workstations but does not
seem to work on Windows 2000/2003 servers. Any Ideas?
Set objSystemSet =
GetObject("winmgmts:{impersonationLevel=impersonate,(Shutdown)}").InstancesOf("Win32_OperatingSystem")
For Each objSystem In objSystemSet
objSystem.Win32Shutdown 0
Next
Devon Harding
Windows
Systems Engineer
Southern
Wine & Spirits - BSG
954-602-2469
__________________________________
This message and any attachments are
solely for the intended recipient
and may contain confidential or
privileged information. If you are not
the intended recipient, any disclosure,
copying, use or distribution of
the information included in the message
and any attachments is
prohibited. If you have received this
communication in error, please
notify us by reply e-mail and
immediately and permanently delete this
message and any attachments. Thank You. | | | |
| jamesblair
Posts:0
 | | 12/14/2005 1:58 AM |
| Devon
You could also utilise Winexit to logoff a server. It free
and can be configured using Group Policy by adding a template, see
attached. Some info info below from Microsoft...
http://support.microsoft.com/default.aspx?scid=kb;en-us;314999&sd=tech
http://support.microsoft.com/default.aspx?scid=kb;en-us;297267
James
From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx
[mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of Steve
ShaffSent: Wednesday, 14 December 2005 10:38 AMTo:
ActiveDir@xxxxxxxxxxxxxxxxxxSubject: RE: [ActiveDir] Win32Shutdown
Method & Win2003 The shutdown command
works. Give that a shot.
S
From:
ActiveDir-owner@xxxxxxxxxxxxxxxxxx [mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx]
On Behalf Of Harding,
DevonSent: Tuesday, December
13, 2005 2:34 PMTo:
ActiveDir@xxxxxxxxxxxxxxxxxxSubject: [ActiveDir] Win32Shutdown Method
& Win2003
I™m using the following script to
logoff a workstation. It works fine on XP workstations but does not seem
to work on Windows 2000/2003 servers. Any
Ideas?
Set objSystemSet =
GetObject("winmgmts:{impersonationLevel=impersonate,(Shutdown)}").InstancesOf("Win32_OperatingSystem")
For Each objSystem In
objSystemSet
objSystem.Win32Shutdown 0
Next
Devon
Harding
Windows Systems
Engineer
Southern Wine & Spirits
- BSG
954-602-2469
__________________________________This
message and any attachments are solely for the intended
recipientand may
contain confidential or privileged information. If you are
notthe intended
recipient, any disclosure, copying, use or distribution
ofthe
information included in the message and any attachments
isprohibited. If
you have received this communication in error,
pleasenotify us
by reply e-mail and immediately and permanently delete
thismessage and
any attachments. Thank You.
ÿþS y m a n t e c M a i l S e c u r i t y r e p l a c e d w i n e x i t . a d m w i t h t h i s t e x t m e s s a g e . T h e o r i g i n a l t e x t c o n t a i n e d p r o h i b i t e d c o n t e n t a n d w a s d e l e t e d .
|
|
|