I'm trying to batch rename vpn connections on my Windows 8.1 machine. I have no trouble modifying the server address with Set-VpnConnection
, but I can't find a way to rename a vpn connection:
First there is no Rename-VpnConnection
cmdlet, and I don't know how to make Rename-Item
to work with Vpn Connection object (if it will ever work); Second, I tried to use ServerAddress
rather than Name
to identify a vpn connection but powershell told me that it's not allowed; Then I tried to add the new name directly after the -Name
argument like this:
Set-VpnConnection -Name "MyVPN" "New Name to MyVPN"
Powershell runs the command silently without error, but didn't take effect at all. Please let me know if this is possible in Powershell and if not, any other programmatic way to do it? Thanks!