?Tell the script to accept no undefined variables. Option Explicit ?Define the variables to use. Dim oWshShell, sValue ?Create an object representing the Windows graphical shell. Set oWshShell = CreateObject(«Wscript.Shell») ?Read the value in sValue. sValue = oWshShell.RegRead(«HKLMSYSTEMCurrentControlSetControlTerminal ServerWinStationsRDP-TCPPortNumber») ?Record the value and explanation in the current computer?s Application log. oWshShell.LogEvent 4, «Terminal Services is currently listening on port «& sValue & «.»