On Apr 10, 9:16*am, Swamy Channaveera
<SwamyChannave...@xxxxxx> wrote:
| Quote: |  | |
|
> The script is as follows
>
> get-content user.txt | foreach { get-qaduser $-} | sort altrecipient |
> select-object displayname, altrecipient | convertto-html list.htm
>
> Regards,
>
>
>
> "Brandon Shell [MVP]" wrote: | Quote: |  | | |
> > Can you show me the code your using? Are you using a LDAP filter?
| | | | | > | Quote: |  | | |
> > "Swamy Channaveera" <SwamyChannave...@xxxxxx> wrote in
> > messagenews:41A5C65E-985D-4620-B58D-BF2C06943146@xxxxxx | Quote: |  | | |
> > > Hi,
| | | | | | | | | | > | Quote: |  | | | | Quote: |  | | |
> > > *I'm using get-qaduser to get some of the attributes from AD. The script
> > > reads a text filee and extracts some of the attributes and writes to the
> > > csv
> > > files. The execution takes a long time. I'm querying for only 35 usersmax
> > > it
> > > takes around 45sec to 1 min to get the info and write it to csv file.
> > > Where
> > > as a VBScript hardly takes 10 sec!!!!
| | | | | | | | | | > | Quote: |  | | | | Quote: |  | | |
> > > I have another script which checks wheter the Homemdb attribute existsand
> > > writes some of the attributes to the csv files. The execution takes a long
> > > time *about 1 hours for 17,000 users.
| | | | | | | | | | > | Quote: |  | | | | Quote: |  | | |
> > > I'm running the script on XP mahcine with 512 MB ram. Any suggestion to
> > > improve the execution would be appriciated.
| | | | | | | | | | > | Quote: |  | | | | Quote: |  | | |
> > > Regards,
> > > Swamy- Hide quoted text -
| | | | | | | | | | >
> - Show quoted text - | |
| | |
Maybe this is just a transcription typo on your part, but isn't there
something more fundamentally wrong with this line?
| Quote: |  | |
|
> get-content user.txt | foreach { get-qaduser $-} | sort altrecipient |
| |
| | |
The current pipeline variable should be '$_' ( dollar, underscore ),
not a '$-' (dollar, minus).
- Oisin