gooddew 0 Posted February 20 Share Posted February 20 (edited) I want to get the name of the connected NetConnectionID of the system's NetConnectionID. thank you Edited February 20 by gooddew Link to post Share on other sites
rudi 51 Posted February 20 Share Posted February 20 Hello, wellcome to the forum. Pls have a look at these to URLs as a start: https://devblogs.microsoft.com/scripting/using-powershell-to-find-connected-network-adapters/#using-wmi Regards, Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to post Share on other sites
Solution zid 4 Posted February 20 Solution Share Posted February 20 Try this: Local $objWMIService = ObjGet("winmgmts:\\localhost\root\cimv2") Local $aItems = $objWMIService.ExecQuery _ ("SELECT NetConnectionID FROM Win32_NetworkAdapter WHERE NetConnectionStatus='2' ", "WQL") For $objItem In $aItems ConsoleWrite($objItem.NetConnectionID & @CRLF) Next ioa747 and gooddew 1 1 Link to post Share on other sites
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now