dewauto Posted February 20, 2023 Share Posted February 20, 2023 (edited) I want to get the name of the connected NetConnectionID of the system's NetConnectionID. thank you Edited February 20, 2023 by gooddew Link to comment Share on other sites More sharing options...
rudi Posted February 20, 2023 Share Posted February 20, 2023 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 comment Share on other sites More sharing options...
Solution zid Posted February 20, 2023 Solution Share Posted February 20, 2023 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 dewauto 1 1 Link to comment Share on other sites More sharing options...
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