Sign in or 

@echo off&Title=Set Adapter Names &MODE CON: COLS=100 LINES=20
powershell -nologo -command "Write-Host 'Attempting to rename adapters named Local Area Connection* to their MAC address'; $Shell = New-Object -com shell.application; $NetCons = $Shell.Namespace(0x31); $NetCons.Items() | where {$_.Name -like 'Local Area Connection*'} | foreach{$AdapName=$_.Name; get-WmiObject -class Win32_NetworkAdapter| where-Object {$_.NetConnectionID -eq $AdapName} | foreach {$MAC=$_.MacAddress}; Write-Host Renaming $_.Name to $MAC; $_.Name=$MAC.replace(':','.')}" | more
pause
|
RyanW-Dell |
Latest page update: made by RyanW-Dell
, Oct 26 2009, 8:00 PM EDT
(about this update
About This Update
51 words added view changes - complete history) |
|
Keyword tags:
Hyper-V
PowerShell
More Info: links to this page
|