I want to pull the names of computer objects in AD in to a file. The method I'm trying so far is this
$computers = Get-ADComputer -Filter * | Format-List namewrite($computers) | Out-File -FilePath .\computers.txt
The issue I have with this though is that the file that is output looks like this:
name : SERVER1name : SERVER2name : WORKSTATION1name : WORKSTATION2
And I'm looking for just a straight list of names with out the "name : " part that comes in front.