Re: VBscript that restart the domain comptuer

Tech-Archive recommends: Fix windows errors by optimizing your registry




"madal" <madal@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:2E458F2D-48E9-4577-ABA0-0B4E59B13EE0@xxxxxxxxxxxxxxxx
I would like to restart domain computer once a day and like to deploy
script
via GPO. Would it be possible ? also at the time it restarts i would like
to
call another vbscript that deletes some files in computer.

Can someone point out how to achieve this ?


With a GPO you can deploy logon, logoff, startup, and shutdown scripts. The
shutdown script, for example, runs during shutdown. It does not initiate
shutdown. I don't see how a GPO script would meet your needs. Logon and
logoff scripts run with the credentials of the user, who probably does not
have permission to restart or delete files.

A VBScript program using WMI can shutdown or restart a computer remotely.
For example:

http://www.microsoft.com/technet/scriptcenter/guide/sas_cpm_gmen.mspx

Perhaps you could restart the computers remotely. You could read computer
names from a text file. WMI can also be used in a VBScript program to
remotely delete files. For example:

http://www.microsoft.com/technet/scriptcenter/guide/sas_fil_vudw.mspx

You need a query for the specific files you want to delete. Browse more of
"Microsoft Windows 2000 Scripting Guide" for more on using WMI queries to
delete files meeting your conditions:

http://www.microsoft.com/technet/scriptcenter/guide/sas_fil_ciaj.mspx

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--


.



Relevant Pages

  • Re: VBscript that restart the domain comptuer
    ... If you have a shutdown script that cleans up the profiles, ... permissions can restart all computers in a list remotely. ... I have already VB script I ...
    (microsoft.public.windows.server.active_directory)
  • Re: logoff/shutdown script
    ... Are you obliged to use VBScript ?If not i can found solution ... someone tries to log off or shutdown a computer. ... I know where to save the script ... the computers. ...
    (microsoft.public.scripting.vbscript)
  • Re: Detect logoff or shutdown
    ... computer is shutting down or restarting from a VBScript running as a ... can FBSL tell whether or not the shutdown is a power off ... shutdown using the shutdown GPO script method. ... they select 'Restart', I could write a startup script to restart the ...
    (microsoft.public.scripting.vbscript)
  • Re: logoff/shutdown script
    ... Are you obliged to use VBScript ?If not i can found solution ... someone tries to log off or shutdown a computer. ... I know where to save the script ... the computers. ...
    (microsoft.public.scripting.vbscript)
  • Re: Fail to restart server remotely
    ... hitting the restart. ... Would be nice to just run a script .... ... I'd like to add trend shutdown to my suite of shutdown scripts that folks ... have anybody on staff that can reboot the server. ...
    (microsoft.public.windows.server.sbs)