PowerShell performance problems on Server 2008 machines Virtual and Physical


i googled solution day yesterday , didn't find helped.  so here scenario: 

we have ps script running on server 2008 r2 reported taking long time.  i checked script , ran manually , ran in 38 seconds on machine (windows 7 pro, quad core, 8 gb of ram).  the virtual server script running on brand new , has lots of resources.  i have checked perfmon , have seen when execute script in ps takes 45 seconds before script begins.  what gives?  so ran same script in server 2003 in both x86 , x64 environments , runs quick.  but when run on windows server 2008 in many x86 , x64 (vm , hardware) flavors script literally takes 9 minutes run. 9 minutes!! that's nuts.  when script runs processor utilization nothing.  so yeah.. i'm looking ideas.  maybe i'm missing something. 


ok.  your responses fair.  i might have been vague.  this not effecting 1 server .. seems effecting server 2008 servers.  the job runs , doesn't appear take errors takes long time.  i asking question find out if knew of quirky server 2008 environment should change.  this same script ran fine in server 2003 , server 2012 takes eternity on server 2008.  it doesn't matter if server physical device or virtual device - same results.  even when go line line through script takes while.  i'm not powershell expert did open windows powershell ise , stepped through code.  and then.. stumbled on own problem.  it kaspersky agent have running.  not sure why wasn't effecting other os's it's fine now. 


Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Azure MFA with Azure AD and RDS

Failed to setup initiator portal. Error status is given in the dump data.

Invalid pointer on gpresult /h gpreport.html