Lab 9 - Question 3 - Learn Windows Powershell In A Month Of Lunches

Welcome Forums General PowerShell Q&A Lab 9 - Question 3 - Learn Windows Powershell In A Month Of Lunches

This topic contains 2 replies, has 2 voices, and was last updated by

 
Participant
1 year, 5 months ago.

  • Author
    Posts
  • #71818

    Participant
    Points: 1
    Rank: Member

    Would this third version of the command work to retrieve the list of hotfixes
    from the domain controllers? Why or why not? Write out an explanation, similar
    to the ones I provided earlier in this chapter.

    get-adcomputer -filter * `
    -searchbase "ou=domain controllers,dc=company,dc=pri" |`
    Select-Object @{l='computername';e={$_.name}} |`
    Get-Hotfix 

    The lab answers state that this solution should work. However, it seems to just run on the localhost and ignore the results found in get-adcomputer. What am I missing here?

  • #71819

    Keymaster
    Points: 1,638
    Helping HandTeam Member
    Rank: Community Hero

    It used to work. Microsoft had a bug in the command and removed the pipeline binding for the computer name parameter.

  • #71822

    Participant
    Points: 1
    Rank: Member

    Ah okay. The command help does not reflect that. Thanks very much for your feedback!

The topic ‘Lab 9 - Question 3 - Learn Windows Powershell In A Month Of Lunches’ is closed to new replies.