I am writing my first script in Powershell. I am using the command "Get-ADGroupMember xxx | select name".
When I type it in Powershell directly the ouput is a list:
name
----
User1
User2
User3
But when I use it in my script:
$Texto = Get-ADGroupMember xxx | select name
write-host = $Texto
The output is this:
$Texto = Get-ADGroupMember xxx | select name
write-host = $Texto
= @{name=User1} @{name=User2} @{name=User3}
how can I write this in my script so I can see it in a List?