I found reboot script at TechNet and I wonder how to apply in VB.Net?
Reboot Coding
************
strComputer = "."
Set objWMIService = GetObject("winm gmts:" _
& "{impersonation Level=impersona te,(Shutdown)}! \\" & _
strComputer & "\root\cimv 2")
Set colOperatingSys tems = objWMIService.E xecQuery _
("SELECT * FROM Win32_Operating System")
For Each objOperatingSys tem in colOperatingSys tems
objOperatingSys tem.Reboot()
Next
Questions?
********
- What namespace that I need? System.Manageme nt?
- Will this coding work in VB.Net? How? What coding should add?
- Will it work at Windows Server 2003?
I need to reboot Windows Server 2003 to clear web cache and SQL cache for
better memory management.
Please advise.
Many thanks.