Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Need to speed up loading PowerShell modules to run my script sooner

$
0
0

Hi,

As a newbie, I wrote a short script to run it every time Windows (8.1) starts up. I put it under the "Startup Script" section in 'Group Policy Editor' and in its COMPUTER CONFIGURATION\WINDOWS SETTINGS\SCRIPTS address. The Windows is a live version running from USB Flash Drive; so, it is intended to be run in a variety of systems.

The problem is that in some systems it runs very late which is very critical to me; though, its execution time varies between less than a second and 2-3 seconds (using Measure-Command). I think the process of loading PowerShell modules is a bottleneck and I am looking a fast and affordable way to make that process drastically faster.

I checked also many links such as this "http://blogs.msdn.com/b/powershell/archive/2008/09/02/speeding-up-powershell-startup-updating-update-gac-ps1.aspx?PageIndex=1#comments", but no benefit I got. The script in that link could not be run as it showed some errors in it.

Any help is welcome?


Viewing all articles
Browse latest Browse all 6937

Trending Articles