Hello, Hoping I can get some assistance with my script below. When I run the script, it returns the data from the last record from the array and not all and I cannot figure out why this is so. if I scroll over $users I can see all the users.
You need to put the Write-Host command (although you don't really want to use that command) inside the foreach loop in order to see the data from each user. Also, you don't need to set a variable to $null before you set it to a real value. Try this: