Help Running Powershell Command using K1000. Change VPN IP Field Only.
10.Currently, each user has a VPN connection named "WG Ikev2 Authpoint Remote" configured under their login that points to a specific IP address. We want to keep all the connection information intact (ex Connection Name, VPN Type, Sign-in Info, Username, Password). We are changing IP addresses and just need to update the Server name or address field only.
I have found a PowerShell script that when ran manually, works perfectly.
Here is the command that works when run manually, either by opening PowerShell and pasting the command, or having it saved in a .ps1 file and run by right clicking on it and choosing "Run with Powershell":
Powershell Command - (Set-VpnConnection -Name "WG Ikev2 Authpoint Remote" -ServerAddress "10.10.10.10" -PassThru)
The IP that was set in that field prior, is then replaced with the 10.10.10.10 address.
HOWERVER, when i use the K1000 to run this on a machine, it says it completed, but the address is never changed.
I found a Quest article that says that native PowerShell within Kace is possible and tried configuring my script like what is posted here:
We need to make sure this is possible before our cutover as once we change IP's on our Firewall, I need to rely on Kace updating all the clients to avoid manually touching each machine once the IP's change.
Can anyone help me with this?
Many thanks and I apologize if this has been posted elsewhere, i have not seen it if so.
it is just a guess but I assume the script need to run under the logged in user right? Do you need to execute the script as admin or can it be changed as normal user? Because the script in the SMA always runs as SYSTEM in default so maybe you have to change it to the logged in user and run it again.
Unfortunately, I have tried all the run-as credentials and it doesn't matter, nothing will execute.
Does anyone have a known solution or powershell script that runs in their environment that i can test in mine? It seems no powershell scripts are running in mine via Kace.
Thank you in advance.