Remotely Reboot Windows with VBS

|==========================================================================
|
| COMMENT: Remotely reboots a PC.  May use machine name or IP address.
|
|==========================================================================

On Error Resume Next
mname = InputBox("Enter Machine Name", "Reboot Machine")
If Len(mname) = 0 Then Wscript.Quit

if Msgbox("Are you sure you want to reboot machine " & mname, vbYesNo, "Reboot Machine") = vbYes then

Set OpSysSet = GetObject("winmgmts:{impersonationLevel=impersonate,(RemoteShutdown)}//" & mname).ExecQuery("select * from Win32_OperatingSystem where Primary=true")
for each OpSys in OpSysSet
OpSys.Reboot()
next
end if
Advertisements

Remotely Reboot Windows with a VBS script

|==========================================================================
|
| COMMENT: Remotely reboots a PC.  May use machine name or IP address.
|
|==========================================================================

On Error Resume Next
mname = InputBox("Enter Machine Name", "Reboot Machine")
If Len(mname) = 0 Then Wscript.Quit

if Msgbox("Are you sure you want to reboot machine " & mname, vbYesNo, "Reboot Machine") = vbYes then

Set OpSysSet = GetObject("winmgmts:{impersonationLevel=impersonate,(RemoteShutdown)}//" & mname).ExecQuery("select * from Win32_OperatingSystem where Primary=true")
for each OpSys in OpSysSet
OpSys.Reboot()
next
end if

How to Disable the System Beep in Windows 7

Click on Start and right click on My Computer. Choose Manage from the menu to open the Computer Management window.

In the left hand pane, expand the group labeled System Tools and click on Device Manager.

Not all devices in your PC are displayed in the Device Manager window by default. Some devices are hidden so you need to tell Window 7 to display the hidden devices. On the menu bar, click on View->Show Hidden Devices.

Back on the Computer Management window, locate and click on a group labeled Non-Plug and Play Drivers. Here you will find a long list of non-plug and play devices connected to your computer and recognized by Windows 7. Locate an item labeled Beep, right click on it, and select Properties from the menu.

On the Beep Properties window, click the Driver tab and change the Startup Type to Disabled.

Click the OK button and restart Windows 7. From now on, you will no longer be annoyed by the occasional system beep from within your PC’s case. If you ever have need for the system beep again, follow the instructions above but change the Startup Type to System instead. Then, your internal speaker will continue to function normally with Windows 7
Once the only sound of which PCs were capable, a computer’s internal speaker is now only a diagnostic tool to troubleshoot PCs with hardware errors. Using the Windows 7 Device Manager window, you can disable the System Beep and stop those annoying beeps from within your computer’s case.
This is a much better solution than removing the speaker from within your PC since you or another troubleshooter may need it diagnose some computer errors.

Remotely Reboot Windows with a VBS script

|==========================================================================
|
| COMMENT: Remotely reboots a PC.  May use machine name or IP address.
|
|==========================================================================

On Error Resume Next
mname = InputBox("Enter Machine Name", "Reboot Machine")
If Len(mname) = 0 Then Wscript.Quit

if Msgbox("Are you sure you want to reboot machine " & mname, vbYesNo, "Reboot Machine") = vbYes then

Set OpSysSet = GetObject("winmgmts:{impersonationLevel=impersonate,(RemoteShutdown)}//" & mname).ExecQuery("select * from Win32_OperatingSystem where Primary=true")
for each OpSys in OpSysSet
OpSys.Reboot()
next
end if