That does work but it only imports 1 computer (the last in my list).
Import-CMComputerInformation -CollectionName "All Systems" -FileName "c:\computers2.csv" -EnableColumnHeadings $True -verbose
csv
Name,Mac Address
test123,00:11:22:33:44:55
test3456,00:11:22:33:44:55
test75689,00:11:22:33:44:55
test899,00:11:22:33:44:55
test756689,00:11:22:33:44:55
Only test756689 is imported.
This is the verbose output:
VERBOSE: Start: Execution of WQL query: SELECT * FROM SMS_Collection WHERE CollectionType = 2 AND Name='All Systems' ORDER by Name
VERBOSE: Query options: None
VERBOSE: Performing the operation "Import" on target "ComputerInformation: c:\computers2.csv".
VERBOSE: Executing method 'ImportMachineEntry' against class 'SMS_Site'
VERBOSE: Input properties:
VERBOSE: -- :: NetBiosName == test123
VERBOSE: -- :: SMBIOSGUID ==
VERBOSE: -- :: MACAddress == 00:11:22:33:44:55
VERBOSE: -- :: OverwriteExistingRecord == True
VERBOSE: Output properties:
VERBOSE: -- :: MachineExists == True
VERBOSE: -- :: ResourceID == 16791724
VERBOSE: -- :: ReturnValue == 0
VERBOSE: -- :: SMSUniqueIdentifier == GUID:D86BB77F-4F29-4DFA-B8A1-874783E55FC0
VERBOSE: Executing method 'ImportMachineEntry' against class 'SMS_Site'
VERBOSE: Input properties:
VERBOSE: -- :: NetBiosName == test3456
VERBOSE: -- :: SMBIOSGUID ==
VERBOSE: -- :: MACAddress == 00:11:22:33:44:55
VERBOSE: -- :: OverwriteExistingRecord == True
VERBOSE: Output properties:
VERBOSE: -- :: MachineExists == True
VERBOSE: -- :: ResourceID == 16791724
VERBOSE: -- :: ReturnValue == 0
VERBOSE: -- :: SMSUniqueIdentifier == GUID:D86BB77F-4F29-4DFA-B8A1-874783E55FC0
VERBOSE: Executing method 'ImportMachineEntry' against class 'SMS_Site'
VERBOSE: Input properties:
VERBOSE: -- :: NetBiosName == test75689
VERBOSE: -- :: SMBIOSGUID ==
VERBOSE: -- :: MACAddress == 00:11:22:33:44:55
VERBOSE: -- :: OverwriteExistingRecord == True
VERBOSE: Output properties:
VERBOSE: -- :: MachineExists == True
VERBOSE: -- :: ResourceID == 16791724
VERBOSE: -- :: ReturnValue == 0
VERBOSE: -- :: SMSUniqueIdentifier == GUID:D86BB77F-4F29-4DFA-B8A1-874783E55FC0
VERBOSE: Executing method 'ImportMachineEntry' against class 'SMS_Site'
VERBOSE: Input properties:
VERBOSE: -- :: NetBiosName == test899
VERBOSE: -- :: SMBIOSGUID ==
VERBOSE: -- :: MACAddress == 00:11:22:33:44:55
VERBOSE: -- :: OverwriteExistingRecord == True
VERBOSE: Output properties:
VERBOSE: -- :: MachineExists == True
VERBOSE: -- :: ResourceID == 16791724
VERBOSE: -- :: ReturnValue == 0
VERBOSE: -- :: SMSUniqueIdentifier == GUID:D86BB77F-4F29-4DFA-B8A1-874783E55FC0
VERBOSE: Executing method 'ImportMachineEntry' against class 'SMS_Site'
VERBOSE: Input properties:
VERBOSE: -- :: NetBiosName == test756689
VERBOSE: -- :: SMBIOSGUID ==
VERBOSE: -- :: MACAddress == 00:11:22:33:44:55
VERBOSE: -- :: OverwriteExistingRecord == True
VERBOSE: Output properties:
VERBOSE: -- :: MachineExists == True
VERBOSE: -- :: ResourceID == 16791724
VERBOSE: -- :: ReturnValue == 0
VERBOSE: -- :: SMSUniqueIdentifier == GUID:D86BB77F-4F29-4DFA-B8A1-874783E55FC0