Hello all, I have been searching on this for a few hours but cannot find a fix. All I want to do is export the findings of these OUs.
Get-ADComputer -Filter * -SearchBase "OU=Laptops,OU=ITS,OU=COM,DC=OURS,DC=LOC,DC=OO,DC=us" | Select-Object Name
Get-ADComputer -Filter * -SearchBase "OU=Desktops,OU=ITS,OU=COM,DC=OURS,DC=LOC,DC=OO,DC=us" | Select-Object Name
Get-ADComputer -Filter * -SearchBase "OU=Desktops,OU=ITS,OU=COM,DC=OURS,DC=LOC,DC=OO,DC=us" | Select-Object Name
Export-CSV c:\users\xxxxxxx\desktop\its.csv
When I run this it returns
cmdlet Export-Csv at command pipeline position 1Supply values for the following parameters:
InputObject:
If I do it like this it works but need to export it to separate .cvs
Get-ADComputer -Filter * -SearchBase "OU=Desktops,OU=ITS,OU=COM,DC=OURS,DC=LOC,DC=OO,DC=us" | Select-Object Name | Export-CSV c:\users\xxxxxxx\desktop\its.csv
What am i missing?
Thanks, Joe