Asked by:
Powershell Output Differences

Question
-
When writing commands on powershell sometimes the output is propagated one way and sometimes the other way.
Let's say I am using the command Get-ADUser -Filter * | ? {$_.name -eq "$name"}
in that situation I can use the Where-Object as below, and sometimes there are commands that populated the results other way and for some reason the Where-Object is not working.
After investigating a little bit I found that Select-String will work for me for the other command that ran instead of the Where-Object.
So it got me wondering what could be the differences between these two outputs?
Thank you
And by the way, if someone has a good learning site that can teach me the basics of all powershell from more inside perspective like what the difference between array and hash table, that that i know already, not really basic stuff :)
LiorG
- Edited by VentAcruZL Tuesday, June 5, 2018 7:17 AM Grammer
- Moved by Bill_Stewart Sunday, July 29, 2018 11:30 PM Unanswerable drive-by question
Monday, June 4, 2018 9:21 PM
All replies
-
Monday, June 4, 2018 9:24 PM
-
Your question Is very difficult to understand due to grammar and word usage errors. Try and find someone to help you with your English.
\_(ツ)_/
Monday, June 4, 2018 9:25 PM -
Your question Is very difficult to understand due to grammar and word usage errors. Try and find someone to help you with your English.
\_(ツ)_/
LiorG
Tuesday, June 5, 2018 8:55 AM -
Sorry but your question still makes no sense in English. What is it that you are having an issue with? What is the outputs that are different than what you expected.
The correct way to use "Get-AdUser" is like this:
Get-ADUser -Filter "Name -eq '$name'"
\_(ツ)_/
Tuesday, June 5, 2018 9:37 AM