Microsoft Operations Manager |
The DumpToFilemethod writes the contents of a VarSetobject to a file.
[VBScript]
GetScriptState.GetScriptSet.DumpToFile(FileName String)
None
Unless the FileNameparameter contains a complete folder path, the file will be created in the MOM OnePoint folder.
The following example shows how to write the contents of the specified VarSetobject to a file in the MOM OnePoint folder.
[VBScript]
Function SaveVarSetToFile(strVarSetName)
Dim objScriptState
Dim objVarSet
Dim strFileName
Dim dtmNow
dtmNow = Now()
strFileName = Month(dtmNow) & "_" & Day(dtmNow) &
"_" & _
Hour(dtmNow) & "_" & Minute(dtmNow) &
"_" & _
Second(dtmNow) & ".dat"
Set objScriptState = ScriptContext.GetScriptState()
Set objVarSet = objScriptState.GetSet(strVarSetName)
Call objVarSet.DumpToFile(strFileName)
Set objScriptState = Nothing
Set objVarSet = Nothing
SaveVarSetToFile = strFileName
End Function
Windows NT/2000: Requires Windows 2000 or later
Version: Requires MOM 1.0 SP1
Did you find this information useful? Please send your suggestions and comments about the documentation to momsdk@microsoft.com.