Question regarding the Network List Manager COM object in Powershell
-
Friday, December 10, 2010 10:41 PM
Hi,
I'd like to know where to post this thread :
I have a problem with retrieving the adapter ID attached to a network connection. i use the NetworkListManager API introduced in Windows Vista on a Windows 7 computer
-----------------------------------------------------------------------------------------------------
$NLMType = [Type]::GetTypeFromCLSID(‘DCB00C01-570F-4A9B-8D69-199FDBA5723B’)
$INetworkListManager = [Activator]::CreateInstance($NLMType)
$INetworkConnections=$INetworkListManager.GetNetworkconnections()
foreach($network in $INetworkConnections){
$network.GetAdapterID()
}
------------------------------------------------------------------------------------------------------
When I make a get-member command on the $network object, GetAdapterID() is listed as one of its methods...
But this script returns an exception calling the GetAdapterID() method....
I can't handle this...
Please could anyone help
All Replies
-
Monday, December 13, 2010 11:11 PM
Hello,
Thank you for your post! I would suggest posting your question in one of the (Windows Server TechCenter > Windows Server Forums > Windows PowerShell) forum located here: (http://social.technet.microsoft.com/Forums/en/winserverpowershell/threads).
Hope that would be helpful.
Have a great day!
Thanks & regards,
Shivendra Pratap Singh Tier 2 Application Support Server and Tools Online Operations Team- Marked As Answer by Ed Price - MSFTMicrosoft Employee, Owner Tuesday, May 22, 2012 6:34 AM

