Hi Don,
I just can't get enough of powershell now that I have the More Lunches book =).
I would really appreciate it if you could advise on Lab question 4 Chapter 7.
The question asks: "Write a command that uses pipeline parameter binding to retrieve a list of running processes from every computer in an AD domain. Don’t use parentheses."
The answer is: get-adcomputer -filter * | select-object @{l='computername';e={$_.name}} | get-process -name *
When I run the above I only have the Localhost processes returned not the other (2) remote computers.
If i run: get-adcomputer -filter * | select-object @{l='computername';e={$_.name}}
This returns the names of all of the computers in the domain i.e.
computername ------------ SERVER1 SERVER2 SERVER3
I can run: Get-process -computername Server1,Server2,Server3 and this displays the processes of all the computers without issue.
Am I doing it wrong?
I very much look forward to your response.
You appear to be doing it correctly, but the stated answer works for me. Not sure why it isn't for you.