There are scenarios where you would need to disable a network adapter,
for example controlling Wi-Fi usage.
On the other hand, there are situations where your computer has multiple
NICs and you want to choose which one is active.
Windows PowerShell v 3.0 offers an easier, more versatile alternative to grappling with 'Netsh' at the
command line: Netsh interface set interface <NIC Name> Disabled
The only problem with PowerShell's Disable-NetAdapter is that you need
to know the Name of your NIC. This is where the sister cmdlet
Get-NetAdapter is handy.
Discover the Names of Your NICs
# PowerShell script to enumerate your network cards. Get-NetAdapter
| Format-Table Name, InterfaceDescription -Auto
Note 1: You can research more properties by
appending |
Get-Member.
Encouraging computers to sleep when not in use is a great idea -
until you are away from your desk and need a file on that remote sleeping machine!
Wake-On-LAN really will save you that long walk to awaken a hibernating
machine; however my reason for encouraging you to download this utility is
just because it's so much fun sending those 'Magic Packets'. As Wake-On-LAN (WOL) is free, see
if I am right, and you get a kick from arousing those sleeping machines.
WOL also has business uses for example, wakening machines so that they can have
their patches applied.
CommandType Name
ModuleName -----------
------
------------ Function Disable-NetAdapter NetAdapter Function
Enable-NetAdapter NetAdapter Function Get-NetAdapter
NetAdapter Function Rename-NetAdapter NetAdapter Function
Restart-NetAdapter NetAdapter Function Set-NetAdapter
NetAdapter
Guy Recommends: SolarWinds' Free Bulk Import Tool
Import users from a spreadsheet. Just provide a list of the
users with their fields in the
top row, and save as .csv file. Then launch this FREE utility and match
your fields with AD's
attributes, click to import the users. Optionally, you can
provide the name of the OU where the new accounts will be born.
There are also two bonus tools in this free download, and all 3 have been approved by Microsoft:
PowerShell version 3 brings hundreds of new cmdlets. If you
research the NetAdapter noun then you will see a family of Get, Enable and
Disable-NetAdapter cmdlets.
If you like this page then please share it with your friends
Windows Management Instrumentation (WMI) is one of the hidden
treasures of Microsoft operating systems.
Fortunately, SolarWinds
have created the
Free WMI Monitor so that you can actually see and understand these gems of
performance information. Take the guess work out of which
WMI counters to use for applications like Microsoft Active Directory,
SQL or Exchange Server.