PowerShell for Windows Admins

Sep 30 2010   12:28PM GMT

WMI and Network Adapters: 8

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

We were looking at MAC Addresses last time. We can filter on MAC address

Get-WmiObject -Class Win32_NetworkAdapter -Filter "MACAddress=’00:27:2B:F5:96:D5’"

No its not my real MAC address 🙂

There are two useful methods on the NetworAdapter class – Disable and Enable

They couldn’t be easier to use

$nic = Get-WmiObject -Class Win32_NetworkAdapter -Filter "MACAddress=’00:27:2B:F5:96:D5’"

Invoke-WmiMethod -InputObject $nic -Name Disable

aand if you want to bring it back

Invoke-WmiMethod -InputObject $nic -Name Enable

The filter can be modified to work on whichever property is the best for your activities

 Comment on this Post

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: