Not really a script problem, just an observation but I would like to know if anyone has found a workaround.
A little background, I’m using Powershell v2 on Windows 7. We have an environment where some systems have had interface configurations pushed by the “netsh interface ip set address ” commands. I’ve been looking at automating the legwork for new setups using powershell.
Without upgrading to v3, I’m looking at either using netsh to set interfaces, or wmi (haven’t found other options).
While testing for a working solution, I’ve found after pushing configurations with the above netsh command, the ip settings are not updated in the Win32_NetworkAdapterConfiguration class but are applied (as can be seen when inspecting the adapter through the Windows Gui).
Additionally, the ipenabled value does not appear to get set to true with netsh either, this results in errors when attempting to set WINS settings or the settcpipnetbios(2) function via powershell wmi for the IP static settings not being set (error 84).
Any suggestions or information regarding working around this problem or correcting the underlying cause?
Also apologies in advance if I can’t get the flair working. This is my first post in this subreddit and under the start a text post there are no flair links as described in the submission guidelines.
Best regards and thanks for any help you can provide.
submitted by /u/dundir
[link] [comments]
The post gwmi object not being updated by changes with network settings applied through netsh appeared first on How to Code .NET.