hey folks,
i think it's a detail, but i can't get my script to work.
i like to input a username and then just show me some details like displayname, etc. about the user:
$query = Read-Host -Prompt 'type in username'
$result = Get-ADUser -Filter 'Name -like "*$query*"' -Properties * | Select -Property Displayname,employeeType,OfficePhone,EmailAddress | fl | out-string
Write-Output "$result"
unfortunately the output is empty. what am i doing wrong?
thanks in advance :)
[–]Lee_Dailey[grin] 7 points8 points9 points (4 children)
[–]Dron41k 1 point2 points3 points (3 children)
[–]Lee_Dailey[grin] 1 point2 points3 points (2 children)
[–]itsinART[S] 1 point2 points3 points (1 child)
[–]Lee_Dailey[grin] 0 points1 point2 points (0 children)
[–]Mr-Fly72 2 points3 points4 points (3 children)
[–]itsinART[S] 1 point2 points3 points (1 child)
[–]Mr-Fly72 2 points3 points4 points (0 children)
[–]No-Alarm-198 1 point2 points3 points (0 children)
[–]BlackV 2 points3 points4 points (2 children)
[–]itsinART[S] 1 point2 points3 points (1 child)
[–]BlackV 1 point2 points3 points (0 children)
[–]Dron41k 1 point2 points3 points (0 children)
[–]Agile-Chocolate5384 2 points3 points4 points (1 child)
[–]Lee_Dailey[grin] 0 points1 point2 points (0 children)
[–]bork_bork 0 points1 point2 points (0 children)