Scripto Bobble-head Games Logo

Welcome to PoshCode and the 2011 Scripting Games!

The Scripting Games are a special event put on by the Microsoft scripting guys. Script submissions, grading, and script archives are hosted by PoshCode.org. You may want to check out the Official Rules, and the Scripting Games Information page for event information and contest details, since this site is purely for submitting your contest entry!

Remember: You will not be able to see other user's scripts until after the deadline for an event has passed, and you will not be able to submit scripts for an event once that event has passed.

Note: If you have any problems logging in, please clear your cookies. If you still have problems, please use the "Contact Us" tab above or post directly on GetSatisfaction.

Searching for Scripts in category 'Beginner Event 10'

  • TimingIsEverything by Joe D. 22 Apr 2011 06:30 AM UTC
    by 4 users

    Beginner Event 10
    2 Comments

    Determine the amount of time a command takes to complete.

  • Measure-Average.ps1 by Daniel Cruz 22 Apr 2011 02:07 AM UTC
    by 2 users

    Beginner Event 10
    2 Comments

    Function: Measures the average amount of time it takes to run a specified command.

  • Beginner10.ps1 by Sadie Trest 22 Apr 2011 04:34 AM UTC
    by 3 users

    Beginner Event 10
    1 Comments

    This script creates a reusable function that executes either the default command or a user supplied command a specified number of times, averages the amount of time each command took to run and returns a string containing the result in milliseconds.

  • Measure-CommandTime.ps1 by Isaiah Jesch 21 Apr 2011 08:38 PM UTC
    by 2 users

    Beginner Event 10
    1 Comments

    This script uses Measure-Command to report on the time it takes Start-Sleep to work. Results are measured in total milliseconds and are reported as the average of 5 runs.

  • Measure-ScriptBlockAverageTime.ps1 by Frank ERBLAND 22 Apr 2011 02:05 AM UTC
    by 2 users

    Beginner Event 10
    2 Comments

    This script measure the average time a scriptblock takes to execute. It runs the scripblock n times and compute the average time with Measure-Command cmdlet. It display a formal message according the asked time unit. By default : It measures the scriptblock {Start-Sleep -Second 5}, 5 times, and shows average result in milliseconds (with 5 digits after decimal point). It also writes the result to the pipeline as an Microsoft.PowerShell.Commands.GenericMeasureInfo object. Possible intermediate results in verbose mode and a progress bar.

  • beginner 10 by Chris Seiter 21 Apr 2011 08:56 PM UTC
    by 2 users

    Beginner Event 10
    2 Comments

    report back average time a command was run for a specified number of times.

  • 2011sg_B10.ps1 by Dan 22 Apr 2011 12:48 AM UTC
    by 2 users

    Beginner Event 10
    1 Comments

  • Test-AvgCmdTime.psm1 by Matt_G 22 Apr 2011 02:17 AM UTC
    by 2 users

    Beginner Event 10
    1 Comments

    Test the average time it takes to execute a command

  • run-event10.ps1 by gmb 22 Apr 2011 03:58 AM UTC
    by 3 users

    Beginner Event 10
    1 Comments

    Beginner event 10

  • SG2011BE10V1.ps1 by Winfried Schoierer 21 Apr 2011 10:43 PM UTC
    by 2 users

    Beginner Event 10
    1 Comments

    This function calls the Start-Sleep Powershell cmdlet X times for a defined amount of seconds and measures the average execution time.

  • BE_10.PS1 by Ken 21 Apr 2011 08:13 PM UTC
    by 2 users

    Beginner Event 10
    1 Comments

    Use PowerShell to Collect Basic Computer Information

  • Beginner10_2011.ps1 by Neil Clinch 21 Apr 2011 08:01 PM UTC
    by 2 users

    Beginner Event 10
    1 Comments

    Measure the average accuracy of the Start-Sleep command by performing a number of runs for a specified duration of seconds. Then display the average amount of time in milliseconds.

  • Beginner_10_2011.ps1 by David Temple 21 Apr 2011 11:56 PM UTC
    by 2 users

    Beginner Event 10
    2 Comments

    SYNOPSIS Finds the Average Milliseconds for a CMDLET or Oneliner. DESCRIPTION The Script will process a provided CMDLET or Onliner and determine the Average Millisecond Time it took for PowerShell to run it. IT IS IMPORTANT TO SURROUND THE VALUE OF CMDLET WITH SINGLE QUOTES. PLEASE SEE THE EXAMPLES. After the process finishes it will report the following for example: "Average time of 5 runs of 5 seconds is 4998.5468 milliseconds." PARAMETERS -Iterations Iterations indicates how many times this process will loop through the provided CMDLET or Oneliner (Note: The default value is "5") -CMDLET Name of the CMDLET (with or without Parameters) and or a Oneliner. IT IS IMPORTANT TO SURROUND THE VALUE OF CMDLET WITH SINGLE QUOTES. (Note: You must enter a CMDLET Parameter. It is Mandatory and will prompt you if you forget. Again if you use a CMDLET with Parameters or you are using a Oneliner, surround the CMDLET Value with Single Quotes. See Examples) EXAMPLE .\Beginner_10_2011.ps1 -Iterations 5 -CMDLET 'Start-Sleep -Seconds 5' Average time of 5 runs of 5 seconds is 5004.4389 milliseconds. NOTE: The Single Quotes. EXAMPLE .\Beginner_10_2011.ps1 -CMDLET 'Get-ChildItem -Path C:\Windows\System32 -Filter "*.dll"' Average time of 5 runs of 5 seconds is 150.44608 milliseconds. NOTE: The Single Quotes. EXAMPLE .\Beginner_10_2011.ps1 -Iterations 2 -CMDLET 'Get-ChildItem C:\Windows -Filter "*.txt" -Recurse' Average time of 2 runs of 5 seconds is 821.15165 milliseconds. NOTE: The Single Quotes.

  • Get-AverageRunTime by Jay Morris - Moreski 21 Apr 2011 10:54 PM UTC
    by 2 users

    Beginner Event 10
    1 Comments

    My submission to Beginner Event 10.... Moreski crosses the finish line :-)

  • Beg_10_TS_measure-tests.ps1 by Thomas 21 Apr 2011 08:32 PM UTC
    by 2 users

    Beginner Event 10
    1 Comments

    Submission for Last Event - Function with reusable parameters: Different Tests & Runs can be specified - Looping with: 1..$x | - Verbose Option

  • Measure-Sleep by Bill Ehardt 22 Apr 2011 12:49 AM UTC
    by 2 users

    Beginner Event 10
    1 Comments

    Function to verify how long Start-Sleep really sleeps. Will ask for parameters if not given and will round the output to the nearest tenth of a millisecond

  • B_Event_10.ps1 by Eric Pankowski 22 Apr 2011 01:17 AM UTC
    by 2 users

    Beginner Event 10
    2 Comments

    Run the Start-Sleep cmdlet a number of times for a set duration and then report the average amount of time it took to complete each run in milliseconds.

  • Get-Sleeptime by Mark Stam 18 Apr 2011 07:37 PM UTC
    by 2 users

    Beginner Event 10
    2 Comments

    This script consists of a function, which takes multiple measurements of a PowerShell command (in this case Start-Sleep) and provides the average time in milliseconds.

  • Start-Sleep test by Andrew Mello 19 Apr 2011 02:20 AM UTC
    by 3 users

    Beginner Event 10
    1 Comments

  • beginner10_2011.ps1 by Sean Massey 21 Apr 2011 02:41 PM UTC
    by 2 users

    Beginner Event 10
    2 Comments

    Measure time that Start-Sleep takes to complete.

  • beginner10_2011.ps1 by Dave Maldonado 21 Apr 2011 07:07 PM UTC
    by 2 users

    Beginner Event 10

    Measures time it takes to run a cmdlet or script block for a specified number of intervals and calculates the average. It sends results to console but can also email results of test to recipient if email parameters are supplied.

  • Test-SleepTiming by ICC_AndyC 15 Apr 2011 03:16 PM UTC
    by 2 users

    Beginner Event 10
    1 Comments

    Measures the actual time it takes to execute a sleep command. For a given number of times, measures the time it takes for the Start-Sleep command to execute. Prints a message containing the number of runs, sleep time, and the average sleep time.

  • SG2011_Beginner10 by KSchulte 16 Apr 2011 03:08 PM UTC
    by 2 users

    Beginner Event 10
    4 Comments

    Beginner Event 10 in 2011 Scripting Games uses Windows PowerShell to determine the amoun of time a command takes to complete.

  • BeginnerEvent10.ps1 by ScriptingWife 21 Apr 2011 04:30 PM UTC
    by 3 users

    Beginner Event 10
    1 Comments

    My submission for beginner event 10.

  • Beginner10_2011.ps1 by Albert Fortes 21 Apr 2011 10:27 AM UTC
    by 2 users

    Beginner Event 10
    1 Comments

    Calculate the average execution time of a command.