function getNTAccounts {
Add-PSSnapin Quest.ActiveRoles.ADManagement
connect-QADService
$accounts = @()
Get-QADUser -CreatedAfter (Get-Date).AddDays(-3) -SerializeValue | Select-Object "samaccountname" | Foreach-Object{
$accounts += $_.samaccountname
}
Disconnect-QADService
return ,$lastaccounts
}
$tmpResult = getNTAccounts
Can you please explain to me why I got this:
{Quest.ActiveRoles.ArsPowerShellSnapIn.Data.ArsADConnection, Account1 Account2}
I'd like to get a simple array but it contains this string in the first element of the array.
Thanks in advance,