function Get-NetView
{
switch -regex (NET.EXE VIEW)
{
“^\\(?<Name>S+)s+”
{
$matches.Name
}
}
}
foreach($i in Get-NetView)
{
(get-wmiobject -class “Win32_NetworkAdapterConfiguration” -computername $i).MACAddress
}
The post List computers using net view and compare the MAC appeared first on Security.