> /ip dhcp-server lease add address=1.2.3.4 mac-address=112233445566
address-lists allow-dual-stack-queue always-broadcast block-access client-id comment copy-from dhcp-option dhcp-option-set disabled insert-queue-before lease-time rate-limit server use-src-mac
можно проверить те записи что уже есть через экспорт. и сделать по аналогии/ip dhcp-server lease export
PS > measure-command { foreach ($i in (1..100000)) { $i | Out-File -Append -FilePath d:\111 } }
TotalSeconds : 30,3746944
PS > measure-command { $r = foreach ($i in (1..100000)) { $i }; $r | Out-File -FilePath d:\111 }
TotalSeconds : 2,084037
PS > measure-command { 1..100000 | Foreach-Object { $_ } | Out-File -FilePath d:\111 }
TotalSeconds : 2,7933249
$xml= [xml](gc d:\111)
$xml.configuration.applicationSettings.'Vendor.Some.App.Properties.Settings'.setting
#name serializeAs value
#---- ----------- -----
#SerialConnectionTimeout String 1000
#так работает
$xml.configuration.applicationSettings.'Vendor.Some.App.Properties.Settings'.setting[2].value = '10000'
#так тоже
$node = $xml.configuration.applicationSettings.'Vendor.Some.App.Properties.Settings'.setting | ? name -eq 'SerialConnectionTimeout'
$node.value = '1111'
$xml.configuration.applicationSettings.'Vendor.Some.App.Properties.Settings'.setting[2].value
#1111
$xml.Save("d:\222")
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<applicationSettings>
<Vendor.Some.App.Properties.Settings>
<setting name="TimeoutStep" serializeAs="String">
<value>300</value>
</setting>
<setting name="TimeoutDuration" serializeAs="String">
<value>5000</value>
</setting>
<setting name="SerialConnectionTimeout" serializeAs="String">
<value>1111</value>
</setting>
</Vendor.Some.App.Properties.Settings>
</applicationSettings>
</configuration>