I’m working on a script for a client to modify a VPN connection so that it times out after 30 minutes. I can get the name of the VPN and modify it with the following.
But I’m getting an error message, “The configuration cannot be applied to the local user VPN connection @{Name=REDACTED VPN}. : The system could not find the phone book entry for this connection.” Yet running the variable code alone DOES show the correct connection name. I’m not finding anything with a Google search.
I think that part is working so the all user isnt needed (cause they get @{Name=REDACTED VPN}. as a response, their issue is the select-object that’s completely unneeded
additionally for -AllUserConnection they’d have to run it elevated (er.. for the set part)
Yeah, it all depends on how the initial connection was created if it was defined for all users or not. But a -RunAs would help the elevation, if needed.