Quantcast
Channel: Active questions tagged powershell-3.0 - Stack Overflow
Viewing all articles
Browse latest Browse all 134

How to remove property header from output when runnign Get-ADComputer

$
0
0

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.


Viewing all articles
Browse latest Browse all 134

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>