Re:Microsoft Replaces Command Prompt with PowerShell in Late...
by JeffreySnover on Friday November 18, 2016 @09:09PM
(#12991610)
That is a good tip.
There are certain product teams that produced ENORMOUS objects and your suggestion helps when dealing with that.
Jeffrey Snover [MSFT]
Re:Microsoft Replaces Command Prompt with PowerShell in Late...
by brazzledazzle on Saturday November 19, 2016 @10:58PM
(#12997188)
Upon reading that again maybe I should have said it's weakness is that it's easy for everyone involved to create objects that use a lot of memory. I'm not sure it's fair to say PowerShell itself is bad at utilizing or managing memory. It's more of a possible negative side effect of one of its great strengths.
Re:Microsoft Replaces Command Prompt with PowerShell in Late...
by youdontknowtho on Friday November 18, 2016 @08:54PM
(#12991557)
That's great advice, man. Cheers.
One performance tip I picked up early on: If you're passing around large object sets you need to operate on try to keep them in a pipeline. Populating a variable and interacting with it is arguably more readable and maintainable, especially for junior people, but it has a heavy cost in terms of memory.
That said every version of posh is better than the last so I may be wrong or overestimating the impact for the newest versions. YMMV, don't believe everything you read on the internet, etc.