Delete attachment write action
Microsoft.SystemCenter.AlertAttachment.DeleteAttachment.WriteAction (WriteActionModuleType)
Delete attachments from a network file share.
Element properties:
Member Modules:
Overrideable Parameters:
Source Code:
<WriteActionModuleType ID="Microsoft.SystemCenter.AlertAttachment.DeleteAttachment.WriteAction" Accessibility="Internal" RunAs="Microsoft.SystemCenter.AlertAttachment.SaveAttachmentAccount" Batching="false">
<Configuration>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="AttachmentDirectoryPath" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="TimeoutSeconds" type="xsd:unsignedInt"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="AttachmentDirectoryPath" Selector="$Config/AttachmentDirectoryPath$" ParameterType="string"/>
<OverrideableParameter ID="TimeoutSeconds" Selector="$Config/TimeoutSeconds$" ParameterType="int"/>
</OverrideableParameters>
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<WriteAction ID="WA" TypeID="Windows!Microsoft.Windows.PowerShellWriteAction">
<ScriptName>DeleteAttachment.ps1</ScriptName>
<ScriptBody><Script>
param($attachmentDirectoryPath)
$ErrorActionPreference = "Stop"
Remove-Item $attachmentDirectoryPath -Force -Recurse
</Script></ScriptBody>
<Parameters>
<Parameter>
<Name>AttachmentDirectoryPath</Name>
<Value>$Config/AttachmentDirectoryPath$</Value>
</Parameter>
</Parameters>
<TimeoutSeconds>$Config/TimeoutSeconds$</TimeoutSeconds>
<StrictErrorHandling>true</StrictErrorHandling>
</WriteAction>
</MemberModules>
<Composition>
<Node ID="WA"/>
</Composition>
</Composite>
</ModuleImplementation>
<InputType>System!System.BaseData</InputType>
</WriteActionModuleType>