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'

  • 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.

  • Test-Duration by Jeffrey Smith 15 Apr 2011 05:07 PM UTC
    by 2 users

    Beginner Event 10
    1 Comments

    A quick function to test the average duration of a given cmdlet. This was a quick fun function to write -- go splatting!

  • 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.

  • 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.

  • get-averagetime by Paul Iddon 17 Apr 2011 09:22 AM UTC
    by 3 users

    Beginner Event 10
    1 Comments

    Get-averagetime Gets the average time of a number of runs of a specified command Scripting Games 2011 Beginner Event 10 Created by Paul Iddon

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

    Beginner Event 10
    1 Comments

  • 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.

  • Get-AverageRuntime by Work Smart 17 Apr 2011 09:30 PM UTC
    by 2 users

    Beginner Event 10

    This script includes a function to calculate the average runtime of a scriptblock over multiple itterations. By default it runs the Start-Sleep cmdlet for 5 seconds over five itterations. It then returns the average runtime in milliseconds. The user can enter an alternate number of itterations or even an alternate scriptblock.

  • Sleep-Check by BradC 18 Apr 2011 06:33 PM UTC
    by 2 users

    Beginner Event 10
    2 Comments

    Test the accuracy of the Start-Sleep command

  • 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.

  • 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.

  • get-ExecutionTime.ps1 by Brian T Young 21 Apr 2011 06:57 PM UTC
    by 2 users

    Beginner Event 10
    2 Comments

    This script will execute the specified scriptblock the number of runs specified and reports back the average time taken in milliseconds.

  • 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.

  • 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 :-)

  • 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.ps1 by MarkDW 19 Apr 2011 01:54 AM UTC
    by 3 users

    Beginner Event 10
    1 Comments

    Scripting Games 2011 Beginner Event 10 Get-AverageRuntime.ps1 Gets the average run time of a command. By default the script will get the average of 5 samples of the start-sleep cmdlet running for 5 seconds each. The number of samples can be modified using the -Samples parameter, and the number of seconds can be modified by using the -Seconds parameter. Alternate commands, utilities, and scripts can be specified with the -Command parameter.

  • Test-SleepPrecision by Daniel Dittenhafer 21 Apr 2011 02:42 AM UTC
    by 2 users

    Beginner Event 10
    3 Comments

    Script to test Start-Sleep based on a specified sample size and sleep duration. Uses [System.Diagnostics.Stopwatch] and Start-Sleep to time the execution of the Start-Sleep commands.

  • 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.

  • 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.

  • 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

  • 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.

  • 2011psb10.ps1 by Polin Yan 17 Apr 2011 05:41 PM UTC
    by 3 users

    Beginner Event 10
    1 Comments

    2011 Scripting Games. Beginner Event 10.

  • WC-Beginners10.ps1 by Sidewinder 20 Apr 2011 01:14 PM UTC
    by 3 users

    Beginner Event 10
    1 Comments

    Measure the accuracy of the Start-Sleep cmdlet

  • Beginner10_2011_andre.gibel.ps1 by Andre Gibel - CH 20 Apr 2011 05:37 PM UTC
    by 3 users

    Beginner Event 10
    2 Comments

    Beginner10_2011_andre.gibel.ps1