use Win32; my $machine = ""; my $message = 'WARNING: This system is about to reboot'; my $timeout = 10; # 10 seconds countdown my $forceclose = 1; # Force all applications to close without saving my $reboot = 1; # Reboot the system after shutdown Win32::InitiateSystemShutdown($machine,$message,$timeout,$forceclose,$reboot);