For scripting VPN connections for MS Always On VPN we have to modify %AppData%\Microsoft\Network\Connections\PBK\rasphone.ini. This file contains multiple entries where values are double or even more often.
Before
DEVICE=vpn
DEVICE=vpn
After
DEVICE=System.Collections.ArrayList vpn
DEVICE=vpn
The first entry will always get this "System.Collections.ArrayList" at first.
This will come at every first entry where the same value appears multiple times.
I'm working with
$Content = Get-IniContent and
$NewContent | Out-IniFile ...
This behavoiur can be reproduced.
For scripting VPN connections for MS Always On VPN we have to modify %AppData%\Microsoft\Network\Connections\PBK\rasphone.ini. This file contains multiple entries where values are double or even more often. Before DEVICE=vpn DEVICE=vpn After DEVICE=System.Collections.ArrayList vpn DEVICE=vpn The first entry will always get this "System.Collections.ArrayList" at first. This will come at every first entry where the same value appears multiple times. I'm working with $Content = Get-IniContent and $NewContent | Out-IniFile ... This behavoiur can be reproduced.