Horje
vbscript shutdown remote computer Code Example
vbscript shutdown remote computer
Set WSHShell = WScript.CreateObject("WScript.Shell")
Set oFS = CreateObject("Scripting.FileSystemObject")

strWarning = "Due to network maintenance, this computer must be restarted. You have 5 minutes to save your work from the start of this countdown. Sorry for any inconvenience caused. "
strDelay = 300	'Delay given in seconds; change this value to your preference, or set it to 0 to give no delay at all

'Open a text file of computer names
'with one computer name per line
Set oTS = oFS.OpenTextFile("C:\computers.txt")

'go through the text file
Do Until oTS.AtEndOfStream
 'get the next computer name
 'store it in variable strCompname
strCompname = oTS.ReadLine
		WshShell.Run "C:\Windows\System32\shutdown.exe -m \\" & strCompname & " -r -c " & Chr(34) & strWarning & Chr(34) & " -t " & strDelay	'Replace the "-r" switch with "-s" to make the computers shutdown instead
Loop
'close the text file
oTS.Close




Python

Related
import csv import re data = [] with open('customerData.csv') as csvfile: reader = csv.DictReader(csvfile) for row in reader: data.append(row) print(data[0]) print(data[1]["Name"]) print(data[ import csv import re data = [] with open('customerData.csv') as csvfile: reader = csv.DictReader(csvfile) for row in reader: data.append(row) print(data[0]) print(data[1]["Name"]) print(data[
one line input in python Code Example one line input in python Code Example
list of thing same condition Code Example list of thing same condition Code Example
python in python Code Example python in python Code Example
block url selenium python Code Example block url selenium python Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7