Re: Daylight saving time script - to confirm current status
- From: Stuart <stuart.angus@xxxxxxxxx>
- Date: Thu, 25 Sep 2008 19:25:52 -0700 (PDT)
Could you run your eyes over this please? I am trying to use bits and
pieces from different scripts to make this work...
Wish I knew what I was doing... :(
+++++++++++++++++++++++++++++++++++++++++
Dim objNet
On error resume next
Const ForAppending = 8
sServerList = "C:\DST\Servers.txt"
sOutputFolder = "C:\DST"
Set objNet = CreateObject("WScript.NetWork")
Set objComputer = CreateObject("Shell.LocalMachine")
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oServerList = oFSO.OpenTextFile(sServerList)
While Not oServerList.AtEndOfStream
ProcessServer(oServerList.ReadLine)
Wend
oServerList.Close
Sub ProcessServer (sServer)
Set oOutPutFile = oFileSYS.CreateTextFile("C:\DST\server_dst.log",
ForAppending, True)
Set objWMIService = GetObject("winmgmts:\\" & sServer & "\root
\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM
Win32_ComputerSystem")
For Each objItem In colItems
oOutputFile.WriteLine "Server name: " & sServer
oOutputFile.WriteLine "Daylight Day: " & objItem.DaylightDay
oOutputFile.WriteLine "Daylight Day of Week: " &
objItem.DaylightDayOfWeek
oOutputFile.WriteLine "Daylight Month: " & objItem.DaylightMonth
Next
oOutputFile.Close
End Sub
.
- Follow-Ups:
- References:
- Daylight savings script - to confirm current status
- From: Stuart
- Re: Daylight saving time script - to confirm current status
- From: Pegasus \(MVP\)
- Daylight savings script - to confirm current status
- Prev by Date: Re: testing AD authentication
- Next by Date: Re: Daylight saving time script - to confirm current status
- Previous by thread: Re: Daylight saving time script - to confirm current status
- Next by thread: Re: Daylight saving time script - to confirm current status
- Index(es):
Relevant Pages
|