I'm trying to filter for Name and Operating system.
I can do name or operating system. But I cannot do both.
How do I get this working
Get-Content "C:\test.txt" | foreach {((Get-ADComputer $_ -Server:"Server 123"-Properties name,operatingsystem).name)}
Get-Content "C:\test.txt" | foreach {((Get-ADComputer $_ -Server:"Server 123"-Properties name,operatingsystem).operating system)}
Both work above.
Get-Content "C:\test.txt" | foreach {((Get-ADComputer $_ -Server:"Server 123"-Properties name,operatingsystem).name.operating system)}
Error
-andblogs.msdn.microsoft.com/adpowershell/2009/04/14/…