Author Posts

August 5, 2015 at 12:39 am

Does anyone have an idea to what could impact the performance of PS when it's run as a normal user VS when running as local admin?

Normal User Account
measure-command {Invoke-Command localhost {Get-ChildItem c:\}}

Days : 0
Hours : 0
Minutes : 1
Seconds : 30
Milliseconds : 582
Ticks : 905821714
TotalDays : 0.00104840476157407
TotalHours : 0.0251617142777778
TotalMinutes : 1.50970285666667
TotalSeconds : 90.5821714
TotalMilliseconds : 90582.1714

User in the local Admins group
measure-command {Invoke-Command localhost {Get-ChildItem c:\}}

Days : 0
Hours : 0
Minutes : 0
Seconds : 0
Milliseconds : 664
Ticks : 6646582
TotalDays : 7.69280324074074E-06
TotalHours : 0.000184627277777778
TotalMinutes : 0.0110776366666667
TotalSeconds : 0.6646582
TotalMilliseconds : 664.6582

August 5, 2015 at 5:07 am

At a guess, it's probably some additional authentication overhead since they're coming in without the Administrator token on their credential. You'd need to also measure the command INSIDE the script block to see if IT runs the same speed, which would tell us if Invoke-Command is adding the time.