![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #11 (permalink) | ||||||||||||||||||||||||||||||||||||
| Guest | Re: Powershell slow $user = [ADSI]"WinNT://ud1/jordd03" $user | get-member The above get-member displays only the default attributes, how the get the complete list of attributes from the get-member command "Swamy Channaveera" wrote:
| ||||||||||||||||||||||||||||||||||||
| | #12 (permalink) | ||||||||||||
| Guest | Re: Powershell slow Hello Swamy,
What happens when you run the one-liner I suggested? get-content user.txt | foreach {[ADSI]"LDAP://$_"} | sort altrecipient | select-object displayname, altrecipient | ||||||||||||
| | #13 (permalink) | ||||||||||||||||||||||||||||||||||||
| Guest | Re: Powershell slow That is inefficient Try This foreach($user in (get-content user.txt)){get-qaduser $user -IncludedProperties altrecipient,DisplayName | select-object displayname,altrecipient} This is with 1000 users 101# measure-command {foreach($user in (get-content user.txt)){get-qaduser -ldap "(&(objectcategory=user)(samAccountName=$user))" -IncludedProperties altrecipient,DisplayName | select-object displayname,altrecipient | sort altrecipient | out-null}} Days : 0 Hours : 0 Minutes : 0 Seconds : 38 Milliseconds : 927 Ticks : 389279822 TotalDays : 0.000450555349537037 TotalHours : 0.0108133283888889 TotalMinutes : 0.648799703333333 TotalSeconds : 38.9279822 TotalMilliseconds : 38927.9822 Outputting to file 102# measure-command {foreach($user in (get-content user.txt)){get-qaduser -ldap "(&(objectcategory=user)(samAccountName=$user))" -IncludedProperties altrecipient,DisplayName | select-object displayname,altrecipient | sort altrecipient | convertTo-html | out-file list.html}} Days : 0 Hours : 0 Minutes : 0 Seconds : 54 Milliseconds : 435 Ticks : 544358147 TotalDays : 0.00063004415162037 TotalHours : 0.0151210596388889 TotalMinutes : 0.907263578333333 TotalSeconds : 54.4358147 TotalMilliseconds : 54435.8147 The way you posted could have issues if the user is not found or blank as it will parse the entire directory. With a filter you get an exact match. This is because get-qaduser treats -id as a wild card. In my case I couldn't even get it to finish because I have 100s of thousands of users. Brandon Shell --------------- Blog: http://www.bsonposh.com/ PSH Scripts Project: www.codeplex.com/psobject SC> The script is as follows SC> SC> get-content user.txt | foreach { get-qaduser $-} | sort altrecipient SC> | select-object displayname, altrecipient | convertto-html list.htm SC> SC> Regards, SC> SC> "Brandon Shell [MVP]" wrote: SC>
| ||||||||||||||||||||||||||||||||||||
| | #14 (permalink) | ||||||||||||||||||||||||
| Guest | Re: Powershell slow The problem here, I am guessing is the way that Quest processes the entries. I would talk to them first. p.s. Should ask for the ability to pass a text file or array directly to get-qaduser get-qaduser -file user.txt or get-qaduser -id (get-content user.txt) "Marco Shaw [MVP]" <marco.shaw@_NO_SPAM_gmail.com> wrote in message news:urGGJ7wmIHA.5956@xxxxxx
| ||||||||||||||||||||||||
| | #15 (permalink) | ||||||||||||||||||||||||||||||||||||
| Guest | Re: Powershell slow I explained this in a different part of this thread. "Swamy Channaveera" <SwamyChannaveera@xxxxxx> wrote in message news:C5A81461-A787-4498-BB7B-44636EE20DEE@xxxxxx
| ||||||||||||||||||||||||||||||||||||
| | #16 (permalink) | ||||||||||||||||||||||||||||||||||||
| Guest | Re: Powershell slow Hello Brandon Shell [MVP],
![]() Karl | ||||||||||||||||||||||||||||||||||||
| |
| |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Windows Live Mail hogging CPU – renders itself and XP into slow, slow, slow mode . . . | Stan Shankman | Live Mail | 6 | 07-10-2008 03:13 PM |
| Powershell is slow | Tim Munro | PowerShell | 10 | 01-24-2008 03:05 AM |
| PowerShell PAINFULLY SLOW across network | mario | PowerShell | 5 | 02-16-2007 04:57 PM |
| Vista Windows are (Not Responding) - Slow Slow Slow | JB1300 | Vista General | 2 | 02-11-2007 10:29 AM |
| Slow performance initializing PowerShell from managed code | =?Utf-8?B?ZGg=?= | PowerShell | 6 | 09-05-2006 02:39 PM |