0

I have a powershell script that runs on an EC2 t2.medium instance, but the script is taking 30 seconds just to import the AWSPowershell module.

I've tried importing only the cmdlets that I need, but it made no difference in load time.

Is it possible to reduce this in any way?

scw
  • 5,450
  • 8
  • 36
  • 49
  • Any idea on what the server load is like? In my past experience this issue occurs on busy systems or when the virtual host is under heavy load. – Persistent13 Sep 08 '17 at 16:49
  • Almost no load. Tried on a few boxes with more load and all took around the same time. Locally it runs in a couple seconds, so it may just be related to the box specs. – scw Sep 08 '17 at 17:43
  • Which PowerShell version do you use? Try PowerShell 5.0 and try using module statement. – ExploringApple Nov 09 '17 at 16:46

0 Answers0