It should at least error... It work perfectly for me.
What is $error?
"Ian_1" <fakeaddy@xxxxxx> wrote in message
news:8B76F27C-21F9-4FC6-9126-4429128C6C90@xxxxxx
Quote:
> Strangely, I copy and paste that, save as a PS1 and run it - it does
> nothing.
> I've chaged OU's and CN's - nothing. It just acts like I've pressed enter.
> Weird.
>
> "Brandon Shell" wrote:
> Quote:
>> How bout this.
>>
>> $group = [ADSI]"LDAP://cn=accountants,ou=city,ou=com"
>> foreach($member in $group.member)
>> {
>> $user = [ADSI]"LDAP://$member"
>> Write-Host ("First Name:{0}" -f ($user.givenName).ToString())
>> Write-Host ("Last Name:{0}" -f ($user.sn).ToString())
>> Write-Host ("Display Name:{0}" -f ($user.Displayname).ToString())
>> Write-Host ("Email:{0}" -f ($user.mail).ToString())
>> Write-Host
>> }
>>
>> "Ian_1" <fakeaddy@xxxxxx> wrote in message
>> news:B7B657F9-9788-4E5D-8E9B-6448345BAB70@xxxxxx Quote:
>> > Sorry, your script doen't not work. I should not have been specific to
>> > just
>> > Quest. It can be WMI, or .NET, or utilizing the ADSI accelerator, etc,
>> > it
>> > really doesn't matter. Since this is the point of scripting to make
>> > life
>> > simple, surely it's as easy as ? (still researching)
>>
>>