Microsoft.SystemCenter.VirtualMachineManager.PRO.V2.Recovery.CreateEvent (WriteActionModuleType)

Element properties:

TypeWriteActionModuleType
IsolationAny
AccessibilityPublic
RunAsDefault
InputTypeSystem.BaseData

Member Modules:

ID Module Type TypeId RunAs 
CreateEventWA WriteAction Microsoft.Windows.ScriptWriteAction Default

Overrideable Parameters:

IDParameterTypeSelector
ScriptParametersstring$Config/ScriptParameters$

Source Code:

<WriteActionModuleType ID="Microsoft.SystemCenter.VirtualMachineManager.PRO.V2.Recovery.CreateEvent" Accessibility="Public" Batching="false">
<Configuration>
<xsd:element name="Name" type="xsd:string"/>
<xsd:element name="VMMServer" type="xsd:string"/>
<xsd:element name="PROTipID" type="xsd:string"/>
<xsd:element name="EventID" type="xsd:string"/>
<xsd:element name="EventSource" type="xsd:string"/>
<xsd:element name="ScriptParameters" type="xsd:string"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="ScriptParameters" ParameterType="string" Selector="$Config/ScriptParameters$"/>
</OverrideableParameters>
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<WriteAction ID="CreateEventWA" TypeID="Windows!Microsoft.Windows.ScriptWriteAction">
<ScriptName>RecoveryCreateEventLogEntry.vbs</ScriptName>
<Arguments>""$Config/Name$"" "$Config/VMMServer$" "$Config/PROTipID$" "$Config/EventID$" "$Config/EventSource$" "$Config/ScriptParameters$"</Arguments>
<ScriptBody><Script>
' Main
' Create the log entry and then execute eventcreate
' Use the command line parameter as the description of the event
'
SetLocale("en-us")

dim argsCount
set args = WScript.Arguments

argsCount = args.Count
if argsCount = 0 then
WScript.quit 1
end if

LogDesc = args.Item(0)
for k = 1 to argsCount -1
LogDesc = LogDesc &amp; "|" &amp; args.Item(k)
next

EventID = args.Item(argsCount-3)
LogName = "Application"
LogSource = args.Item(argsCount-2)

Set WshShell = WScript.CreateObject("WScript.Shell")
strCommand = "eventcreate /T Information /ID " &amp; EventID &amp; " /L " &amp; LogName &amp; " /SO " &amp; LogSource &amp; " /D " &amp; Chr(34) &amp; LogDesc &amp; Chr(34)
WshShell.Run strcommand , 0

</Script></ScriptBody>
<TimeoutSeconds>120</TimeoutSeconds>
</WriteAction>
</MemberModules>
<Composition>
<Node ID="CreateEventWA"/>
</Composition>
</Composite>
</ModuleImplementation>
<InputType>System!System.BaseData</InputType>
</WriteActionModuleType>