Forum Discussion
xoxidein
Jul 15, 2022Iron Contributor
Output AD User Details as List
I'm trying to build a script that will let me list and add proxy addresses for users. Right now I'm just trying to get it to list (as a list, not a string) the proxy address for a user: #Define...
- Jul 15, 2022
xoxidein I changed your script a little bit:
#Define Target User Write-Host "`nEnter the target username: " -ForegroundColor "Yellow" -NoNewLine $username = Read-Host #List existing addresses Get-ADUser -Identity $username -Properties proxyaddresses | Select-Object -ExpandProperty proxyaddressesThe `n does a new-line and instead of format-table I used Select-Object -ExpandProperty. Output is like this:
email address removed for privacy reasons
email address removed for privacy reasons
email address removed for privacy reasons
Jul 15, 2022
xoxidein I changed your script a little bit:
#Define Target User
Write-Host "`nEnter the target username: " -ForegroundColor "Yellow" -NoNewLine
$username = Read-Host
#List existing addresses
Get-ADUser -Identity $username -Properties proxyaddresses | Select-Object -ExpandProperty proxyaddressesThe `n does a new-line and instead of format-table I used Select-Object -ExpandProperty. Output is like this:
email address removed for privacy reasons
email address removed for privacy reasons
email address removed for privacy reasons
xoxidein
Jul 15, 2022Iron Contributor
BINGO! Thank you Harm_Veenstra