Erwin Pombett
asked on
in powershell how to parse the get-aduser output in order to filter the result with select-string ?
Hello,
i'd like to recover some informations out of the get-aduser output.
todo so i thought i could pipe the output and then apply the "select-string" cmd as follows :
Get-ADUser -identity theIdentifiedUser -server myserver.ext.com -Properties * | Select-String -Pattern '*last*'
Question:
how can i recover all lines - of the output - that have "last" in it ?
thank you in advance.
toshi
i'd like to recover some informations out of the get-aduser output.
todo so i thought i could pipe the output and then apply the "select-string" cmd as follows :
Get-ADUser -identity theIdentifiedUser -server myserver.ext.com -Properties * | Select-String -Pattern '*last*'
Question:
how can i recover all lines - of the output - that have "last" in it ?
thank you in advance.
toshi
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
EXPERT CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hello !
@Subsun : am i missing something with your first proposal as i dont have the display of the "DisplayName" ? the second "to phrase property" is OK.
@oBda : your second proposal (i really insisted on a string -based search ;) ) is exactly was i was looking.
thank you so much
toshi
@Subsun : am i missing something with your first proposal as i dont have the display of the "DisplayName" ? the second "to phrase property" is OK.
@oBda : your second proposal (i really insisted on a string -based search ;) ) is exactly was i was looking.
thank you so much
toshi
You can filter based on property values.. You can modify the filter based on which property you want to filter.
Example to filter Displayname, use..
Open in new window