Microsoft Operations Manager

GetScriptState Method

The GetScriptStatemethod gets the ScriptStateobject.

[VBScript] ScriptContext.GetScriptState()

Parameters

None

Return Value

Object

Remarks

You can use the ScriptStateobject as a persistent store for script variables.

Examples

The following example shows how to access the ScriptStateobject.

[VBScript] 
Function GetSavedVarSet(strVarSetName)
	Dim objScriptState
	Dim objVarSet

	Set objScriptState = ScriptContext.GetScriptState()
	Set objVarSet = objScriptState.GetSet(strVarSetName)

	Set objScriptState = Nothing

	Set GetSavedVarSet = objVarSet
End Function

Requirements

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

See Also

ScriptContext Object, ScriptState Object


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