A question on the ITKE forums asked how files older than a certain date (in this case two months) could be deleted without touching younger files.
We have looked at using Win32_NetworkAdapter and Win32_NetworkAdapterConfiguration.
Get-WmiObject -Class Win32_NetworkAdapter -Filter "NetEnabled='$true'" |
Format-List NetConnectionID, Description, MACAddress, Speed
When: Tuesday, Sep 14, 2010 8:30 PM (BST)
Jonathan Medd - PowerShell MVP - explains the new remoting features in PowerShell 2.0
Richard Siddaway has invited you to attend an online meeting using Live Meeting. ...
We have seen how to query WMI for information on network adapters. But what we didn’t get was information about the addresses allocated to the NICs. We need a different class for that
Get-WmiObject -Class Win32_NetworkAdapterConfiguration
Today Manning are offering 50% their best selling books including PowerShell in Practice.
See www.manning.com to order
Get-WmiObject -Class Win32_NetworkAdapter
will show us a list of network adapters. We can narrow this down to a specific adapter
Get-WmiObject -Class Win32_NetworkAdapter -Filter "DeviceId='11'" | fl *
What if we know that there is a...
Ok – just to help out we can do this to see the useful information we need to complete our IPconfig listing
Get-WmiObject -Class Win32_NetworkAdapter -Filter "NetEnabled='$true'" | Format-List NetConnectionID, Description, MACAddress, Speed
This gets a display like...
Network adapters are a fundamental part of our system – without them our networks grind to a halt because the machines can’t communicate. We have a good tool in ipconfig for looking at NIC information but we can extend this using PowerShell and WMI. Let’s start by seeing what is...
Working with WMI dates can be awkward sometimes. For instance if we look at the last boot up time of our system
$machine = Get-WmiObject -Class Win32_OperatingSystem
We get a non-intuitive...