Run Command on Group
Updated: 21 May 2010 | 4 comments
This issue has been solved. See solution.
I know I can reboot a client using the Run Command on Group or client. Can SEP be used to issue a shutdown command to a machine?
discussion Filed Under:
Comments
Taking a quick look, doesn't
Taking a quick look, doesn't seem that this is a possibility.
You can always use the windows command line shutdown command to achieve this though. Run it with /? to get a listing of the various switches that can be used. This command can be run against remote systems using the -m switch.
Run Command on Group
Hi,
The various options that you have from the "Run Command on Group or client" are as follows
Can SEP be used to issue a shutdown command to a machine?.....NO
Thanks & Regards Sandip C Sali
Note if you use the Restart from the console
Depending on how your clients are configured to communicate with the server, it may take them a while to receive the command. My systems check in every hour so if I restart them from the console they may not restart as soon as I would like them. Therefore, I usually use other tools to accomplish this rather than the SEP console.
'
' *****************************************************************
' reboots a (remote) computer
Sub RebootComputer( strServer )
Set objOSSet = GetObject("winmgmts:{(RemoteShutdown)}//" & strServer & "/root/cimv2").ExecQuery("select * from Win32_OperatingSystem where Primary=true")
For each objOS in objOSSet
objOS.Reboot()
Next
End Sub
' *************************************************************
' Main
' **************************************************************
Dim strComputer
Do
strComputer = inputbox( "Please enter the name of the computer you want to reboot", "Input" )
Loop until strComputer <> ""
RebootComputer( strComputer )
WScript.Echo( "Computer " & strComputer & " rebooted" )
My sites - http://theamcpages.com & http://antique-engines.com
Toy:
Shadow:
Would you like to reply?
Login or Register to post your comment.