Forum Discussion
Powershell - Set-VpnConnectionIPsecConfiguration : Invalid namespace
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.4648
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
My desktop at the office and laptop are the same Windows version 10.xx It is just the laptop (which I would use a VPN client) is not accepting these commands.
If there was another means of editing the VPN connection I would just use that, goal is to reconfigure the default 3DES that Windows defaults to using. I have not found any software package or registry edit option so I am left with having to use this PS command.
Because WMI operates independently from PowerShell, you will get the same result from Windows PowerShell x86 and x64.
You can run the following command as a manual test, where if the namespace does exist, you will simply get a null response (i.e. nothing will be returned, including no errors):
Get-CimInstance -ClassName PS_VpnConnectionIPsecConfiguration -Namespace root/Microsoft/Windows/RemoteAccess/Client;
However, I would anticipate that you will get the same "invalid namespace", in which case perhaps there's something that can be done about it, perhaps not - I haven't looked yet.
You've noted the Windows 10 version is the same, but what about the Windows Edition? You can quickly check by typing:
winver
Windows Enterprise and Education are the most fully-featured. Then you step back in some areas for Windows Professional. Lastly, Windows Home is a big step backwards in features.
I can't say that I remember all the differences between editions, but if it's Home, it wouldn't surprise me if the namespace is missing by design.
But if you're running Enterprise or Professional, it seems more likely something has gone wrong with your WMI repository and you'll need to look at other actions such as re-adding a missing MOF, running a repair using sfc.exe or, in the worst case, potentially rebuilding the full MOF cache. But I won't explain any of that until there's a point in doing so, as I'd have to do some digging and refreshing of my own memory first anyway.
Cheers,
Lain
- SeanWaiteJul 17, 2024Copper ContributorHi Lain,
You were correct, I did run that command and got "Invalid Namespace". My version is Enterprise for the laptop that has this issue (and one at my office that works is Enterprise as well).
I did run sfc /VERIFYONLY and just came up with "Warning: Overlap: Directory \??\C:\Program Files (x86)\ is owned twice or has its security set twice" but nothing else stood out like "Hey you are missing X or Y.
It might make more sense when I get a spare laptop to use for a while to just take this current own to reset/rebuild/reinstall if necessary. I work remote and this is my primary laptop, but at the moment I do not have the need to use the Windows L2TP client with AES256. But it seems like the solution to this problem will involve little bit more than simply adding a file or re-installing a component. The most important thing for me is that the PS command did work, I was able to test a VPN connection using AES256/DH14 which is how this all started. Granted it is not working on the one laptop I would need this for, but little steps 🙂