Microsoft Operations Manager

DumpToFile Method

The DumpToFilemethod writes the contents of a VarSetobject to a file.

[VBScript]
GetScriptState.GetScriptSet.DumpToFile(FileName String)

Parameters

FileName
Specifies the name or path of the file used to store the VarSetvalues.

Return Value

None

Remarks

Unless the FileNameparameter contains a complete folder path, the file will be created in the MOM OnePoint folder.

Examples

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

Requirements

Windows NT/2000: Requires Windows 2000 or later
Version: Requires MOM 1.0 SP1

See Also

VarSet Object


Did you find this information useful? Please send your suggestions and comments about the documentation to momsdk@microsoft.com.