THE INFORMATION IN THIS ARTICLE APPLIES TO:
Can I export a list of all of the IP addresses available on EFT?
Yes. Using an Advanced Workflow Engine (AWE) task with a script action, you can export a list of the IP addresses on EFT to a file.
An example of such an AWE task is copied below.
To import the workflow
- Paste the code below into a text file.
- Save the file named with the Site name, an underscore, and then the task a name, such as"MySite_GetCurrentIPAddressCSV" with the extension of .aml.
- Import the file into AWE using the Import button, as described in Importing Workflows in the AWE help documentation.
After you import the workflow, it will appear in the Advanced Workflows node of the tree.
- Create an Event Rule, such as a Timer rule, and add the Execute Advanced Workflow Action.
- Click the Advanced Workflow Action in the Rule Builder. The Advanced Workflow dialog box appears.
- In the Advanced Workflow dialog box of the Event Rule, select the new AWE task to add it to the Event Rule.
The Event Rule will look similar to the one below (which, in this example, is in an active-active cluster). You can then add follow-on actions, such as an email notification.
Note that if you are creating this rule for an HA environment, you must define the node the rule is to run on, and a backup default node.
Copy and paste the code below into a TXT file, then save it with an AML extension and import it into EFT.
<TASKINFO TASKVERSION="8090" />
<AMFUNCTION NAME="Main" RETURNTYPE="variable">
<!-- Collect a list of IPs and create a CSV list -->
<AMSCRIPT>Function GetCurrentIPAddressCSV As String
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set ipConfigSet = objWMIService.ExecQuery ("SELECT IPAddress FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled='True'")
ipCSVString = Null
For Each ipConfig In ipConfigSet
If Not IsNull(ipConfig.IPAddress) Then
For i = LBound(ipConfig.IPAddress) To UBound(ipConfig.IPAddress)
If Not InStr(ipConfig.IPAddress(i), ":") > 0 Then
If Not IsNull(ipCSVString) Then
ipCSVString = ipCSVString & "," & ipConfig.IPAddress(i)
ipCSVString = ipConfig.IPAddress(i)
GetCurrentIPAddressCSV = ipCSVString
' returnVal = GetCurrentIPAddress()
In the line that defines the location and name of file to write to, "<AMFILEWRITE FILE" you can save it to any location and name it whatever you want, as long as EFT can write there.