Hello, how or which variable do I use in a vbscript to specify the hostname of the server to be tested on? I have the APM template built up and works great except I don’t want to hardcode the hostnames in the script, rather have the assigned server be used by strComputerName
Set wshNetwork = WScript.CreateObject( "WScript.Network" )
strComputerName = "{Hostname}"
Set objRegEx = New RegExp
objRegEx.Global = True
objRegEx.Pattern = "DELIVERED"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("\\" & strComputerName & "\d$\Program Files\Research In Motion\Blackberry Enterprise Server\Logs\" & x & "\BESSRV01_MDAT_01_" & x & "_0001.txt", ForReading)
strSearchString = objFile.ReadAll
objFile.Closed