When I run Get-ADComputer cmdlet, I can view all of the single object's properties, like below.
C:\PS>Get-ADComputer "Fabrikam-SRV1" -Properties *
AccountExpirationDate :
accountExpires : 9223372036854775807
AccountLockoutTime :
AccountNotDelegated : False
AllowReversiblePasswordEncryption : False
BadLogonCount :
CannotChangePassword : False
CanonicalName : Fabrikam.com/Computers/fabrikam-srv1
I then can filter which Properties to display in the output. Is this possible to get all of the Properties for a list of computer objects in a file (txt or csv) and then filter the needed one?
Something like this Get-ADComputer -Computer (Get-Content -Path .\computers.txt) | Select CanonicalName,CN,DistinguishedName