Skip to content

Instantly share code, notes, and snippets.

@DailenG
Created November 11, 2022 15:15
Show Gist options
  • Save DailenG/ff8348ed4c5731904f8549ab0136117c to your computer and use it in GitHub Desktop.
Save DailenG/ff8348ed4c5731904f8549ab0136117c to your computer and use it in GitHub Desktop.
SonicWall GVC VPN Profile Merge
Copy-Item $env:AppData\SonicWall\Global VPN Client\Connections.rcf $env:AppData\SonicWall\Global VPN Client\Connections.old.rcf
[xml]$xml1 = get-content "$env:AppData\SonicWall\Global VPN Client\Connections.rcf" -Encoding Unicode
[xml]$xml2 = get-content "C:\temp\NewConnection.rcf" -Encoding Unicode
$xml2Node = $xml1.ImportNode($xml2.SW_Client_Policy.Connections.Connection,$true)
$xml1.SW_Client_Policy.Connections.AppendChild($xml2Node)
$xml1.Save("$env:AppData\SonicWall\Global VPN Client\Connections.rcf")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment