3/7/2023 0 Comments Mac find hostname from ip$Computers = Import-Csv C:\Users\admin_stagiair\Desktop\Computers.txt $result | Export-Csv C:\Users\admin_stagiair\Desktop\Computers.csv -Delimiter " " -NoTypeInformationĪnd this is the part that I tried to make search the list and filter out the online computers, which absolutely does not work and I can't figure out how to do it. $x = New-Object System.Object | select ComputerName, MAC Get-WmiObject Win32_NetworkAdapterConfiguration -Filter 'ipenabled = "true"' $Computers = Import-CSV C:\Users\admin_stagiair\Desktop\Computers.txt This is the part that searches the list I create with hostnames. The point is that I have to make a list of hostnames, which I can do, but then the other script runs into a problem because some computers are not online.Ĭan anyone help me get a list with only the pc's that are online? That's why I already used a small script from someone else. I know that MAC addresses are not in the Activce Directory. I'm trying to get the hostname and the MAC address from all PCs in the Active Directory.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |