Demande de détection de déclencheur d'interruption
System.NetworkManagement.TrapDiscoveryRequest (WriteActionModuleType)
Action d'écriture interne pour la demande de déclencheur d'interruption
Element properties:
Member Modules:
Source Code:
<WriteActionModuleType ID="System.NetworkManagement.TrapDiscoveryRequest" Accessibility="Internal" Batching="false" RunAs="System!System.PrivilegedMonitoringAccount">
<Configuration/>
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<WriteAction ID="Script" TypeID="Windows!Microsoft.Windows.PowerShellWriteAction">
<ScriptName>TrapDiscoveryRequest.ps1</ScriptName>
<ScriptBody><Script>
param($DeviceId)
try
{
$SCOMPowerShellKey = "HKLM:\SOFTWARE\Microsoft\System Center Operations Manager\12\Setup\Powershell\V2"
$SCOMModulePath = Join-Path (Get-ItemProperty $SCOMPowerShellKey).InstallDirectory "OperationsManager"
if (!(Get-Module OperationsManager))
{
Import-module $SCOMModulePath
}
$device = Get-SCOMClassInstance -Id $DeviceId
$mg = $device.ManagementGroup
$mg.NetworkDiscovery.RediscoverDevice($device.Id)
}
finally
{
Get-Module OperationsManager | Remove-Module
}
</Script></ScriptBody>
<Parameters>
<Parameter>
<Name>DeviceId</Name>
<Value>$Data/Params/Param[1]$</Value>
</Parameter>
</Parameters>
<TimeoutSeconds>300</TimeoutSeconds>
</WriteAction>
</MemberModules>
<Composition>
<Node ID="Script"/>
</Composition>
</Composite>
</ModuleImplementation>
<InputType>System!System.Event.Data</InputType>
</WriteActionModuleType>