[Date Prev][Date
Next][Thread Prev][Thread Next][Date
Index][Thread Index]
Re: X10 - shutting down a PC ?
Here's a nifty little vbscript script you can use (it works on NT but not
tried it on XP)
Const EWX_LOGOFF = 0
Const EWX_SHUTDOWN = 1
Const EWX_REBOOT = 2
Const EWX_FORCE = 4
Const EWX_POWEROFF = 8
strComputer="computernamehere"
wmiPath = "winmgmts:{(RemoteShutdown)}!//" & strComputer
& "/root/cimv2"
Set wmi = GetObject(wmiPath)
set objOSset = wmi.instancesof("win32_operatingsystem")
nOptions = EWX_LOGOFF + EWX_FORCE + EWX_SHUTDOWN+EWXPOWEROFF
for each objOS in objOSset
objOS.win32shutdown nOptions
next
S.
___________________________________________________________________________
The information contained in this message is confidential and may be
legally privileged. If you are not the intended recipient, please do not
read, copy or otherwise use it and do not disclose it to anyone else.
Please notify the sender of the delivery error and then delete the
message from your system.
Any views or opinions expressed in this email are those of the author only.
Communications will be monitored regularly to improve our service and for
security and regulatory purposes.
Thank you for your assistance.
___________________________________________________________________________
Home |
Main Index |
Thread Index
|