Created
May 4, 2018 15:12
-
-
Save pablitocli/4746b8f6f2ea932126fdc9187f5118f2 to your computer and use it in GitHub Desktop.
Buscavmbymac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write-Host " BUSCADOR DE MacAddress " -foregroundcolor "black" -backgroundcolor "green" | |
$macaddress= Read-Host "INGRESAR LA MacAddress, CON EL SIGUIENTE FORMATO EJ: 00:50:56:a3:11:c5" | |
foreach ($vm in get-vm ) | |
{ | |
$mac= get-networkadapter -vm $vm | select macaddress | |
if($mac.MacAddress -eq $macaddress) | |
{ | |
Write-Host " SERVIDOR <"$vm"> " -foregroundcolor "black" -backgroundcolor "YELLOW" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment