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 'Advanced Event 10'

  • Write-Temp by Milo 16 Apr 2011 05:10 AM UTC
    by 2 users

    Advanced Event 10
    5 Comments

    The 2011 Scripting Games Advanced Event 10: Use PowerShell to Create a Function to Create Temp Files

  • New-TempFileContent by Rich Kusak 22 Apr 2011 04:58 AM UTC
    by 3 users

    Advanced Event 10
    2 Comments

    The New-TempFileContent function creates a temporary file in the Windows temp location and saves content in the file. Optionally, the file contents can be shown by use if the -Show parameter.

  • Out-TempFile.ps1 by Robert van den Nieuwendijk 21 Apr 2011 09:51 PM UTC
    by 3 users

    Advanced Event 10
    1 Comments

    Submission for the 2011 Scripting Games Advanced Event 10. Sends output to a temporary text file. The temporary file gets a temporary name, and it resides in the temporary folder.

  • out-tempfile.ps1 by mjolinor 21 Apr 2011 10:53 PM UTC
    by 3 users

    Advanced Event 10
    1 Comments

    Creates a temporary (.tmp) file in the system temp directory, and writes pipeline input to the file. Encoding and newlines can be specified by parameters, and will optionally open the file in Notepad after writing. Checks for interactive user environment before running Notepad, and prompts for verification before opening large files. Includes support for shouldprocess, provided debug and verbose output.

  • 2011psa10.ps1 by Polin Yan 22 Apr 2011 01:49 AM UTC
    by 2 users

    Advanced Event 10

    2011 Scripting Games. Advanced Event 10.

  • New-TemporaryFile by Boe Prox 22 Apr 2011 02:37 AM UTC
    by 2 users

    Advanced Event 10
    1 Comments

    In at the last minute...kind of like last year. This command takes the original requirements of creating a temp file on the user's temp folder that accepts data from the pipeline if used and supports whatif,verbose and debug. After creation of the file, the file path and name is displayed. An option to open the file can be performed using the -DisplayFile switch. In its default state, you can run the command and it will automatically generate a file and save it to your temp folder. Because I felt that was sort of a limited feature, I added the ability to state your own destination path and file if needed. An additional feature is that if the folder path does not exist at the time, the folders will automatically be created for you. Also added is the option to determine what type of encoding you wish to use using the -Encoding parameter and supplying the proper encoding name. When added to a profile, this function will be visible for use.

  • adv10.ps1 by Francis D 22 Apr 2011 03:49 AM UTC
    by 2 users

    Advanced Event 10
    2 Comments

    Output to a temporary text file in the temp folder

  • Advanced_10.ps1 by Justin Stokes 21 Apr 2011 08:54 PM UTC
    by 2 users

    Advanced Event 10

    This script contains the New-TempFile function, which is a solution to Advanced event 10. The event called for a function, so this script needs to be dot-sourced to run.

  • Out-Temp by Miklos Karasz 21 Apr 2011 09:59 PM UTC
    by 2 users

    Advanced Event 10
    1 Comments

    The Out-Temp function sends output to a temporary file. Displays the content in notepad if -Notepad specified. Character encoding can be altered from the default ASCII. The temporary file will not be deleted if -Keepfile is specified. You can pipe string or objects also.

  • Add-ContentToTempTextFile.ps1 by Matthew BETTON 15 Apr 2011 09:20 PM UTC
    by 2 users

    Advanced Event 10
    1 Comments

    The Add-ContentToTempTextFile function adds string content to a temporary random file name.

  • Library-TempFile.ps1 by Bartek Bielawski 17 Apr 2011 06:33 PM UTC
    by 3 users

    Advanced Event 10
    2 Comments

    Script with single function to create temporary files from pipeline input. Need to dot-source it in order for it to work, thus name of the script. I tried to use all good things that come with advanced functions. I even managed (finally ;) ) to get proper support for 'Yes to All' and 'Now to All' in process block, usually it was asking regardless option selected... ;) I used -confirm:$false to prevent cmdlets from picking up $ConfirmPreference (they would prompt user again). Was not sure which verb too choose (Out or New) - finally decided to go with New, as we create things rather than redirect stuff to something that is always there (like Host... or Null ;) ).

  • Out-TempFile by Jason Hofferle 16 Apr 2011 09:18 PM UTC
    by 2 users

    Advanced Event 10
    2 Comments

    This advanced function creates a uniquely named tmp file in the current user's temporary directory. It accepts any type of object through the pipeline or InputObject parameter. It supports Unicode and ASCII encoding, and includes a parameter for opening the temporary file with notepad.

  • Advanced_2011_event10.ps1 by Eddy Steenbergen 21 Apr 2011 04:21 PM UTC
    by 2 users

    Advanced Event 10

    A bit like rewriting [IO.Path]::GetTempFileName() in powershell !?

  • CreateTempFile.ps1 by Franck RICHARD 21 Apr 2011 02:29 PM UTC
    by 2 users

    Advanced Event 10

    2011 Scripting Games Advanced Event 10: Use PowerShell to Create a Function to Create Temp Files

  • Out-TempFile by vbscripter 18 Apr 2011 05:32 AM UTC
    by 2 users

    Advanced Event 10
    1 Comments

    This function saves data to a temporary file and returns path to it. The function accepts piped content and has comment-based Help.

  • Set-TempFile by Alex McFarland 20 Apr 2011 07:27 PM UTC
    by 2 users

    Advanced Event 10
    1 Comments

    Writes data to an automaticly generated temporary file, in either ASCII or Unicode format. Data may come from the pipeline or a command line parameter. Grading Criteria: -Advanced function, complete with comment-based Help. -Accepts piped content. -Returns the path to the temporary file. -The temporary file has a temporary name, and resides in the temporary folder. -Function is appropriately named. -Has a switch that will display the content of the temporary file in Notepad. -Supports an encoding parameter and support ASCII and Unicode as encoding types. -Supports the whatif, debug, and verbose parameters.

  • Advanced10_2011.ps1 by Albert Fortes 21 Apr 2011 09:57 AM UTC
    by 2 users

    Advanced Event 10
    1 Comments

    Sends output to a temporary file.

  • New-TemporaryFile by Daniel Richnak 17 Apr 2011 06:08 PM UTC
    by 2 users

    Advanced Event 10

    Creates a text file in user's TEMP directory. Will write input to this file.

  • New-TempFile.ps1 by spinlock 21 Apr 2011 07:01 AM UTC
    by 2 users

    Advanced Event 10

    Returns a temporary file name. If the -InputObject parameter is specified (or piped in), the contents are written to the temporary file. Accepts and acts upon -whatif, -encoding, -verbose -debug parameters Allows the user to specify which directory the tempfile is to be created in. Optionally displays the contents of the temporary file in notepad once completed (-ShowInNotepad)

  • bpfinn_adv10.ps1 by 98d0d0c4b2ec3108763ceb1cc9a64141 18 Apr 2011 07:19 PM UTC
    by 2 users

    Advanced Event 10
    1 Comments

    This script creates a temporary text file in the current user's temporary directory. It accepts piped input and places it in this file. If you provide the -OpenInNotepad argument, the script will open the temporary file that has just been created in Notepad.

  • New-TempFile by Matthew Painter 21 Apr 2011 12:57 PM UTC
    by 2 users

    Advanced Event 10
    2 Comments

    Advanced Event 10 in the 2011 Scripting Games uses Windows PowerShell to create an advanced function to create temporary files.

  • Advanced10_2011.ps1 by Jason Scott 18 Apr 2011 02:12 AM UTC
    by 2 users

    Advanced Event 10

  • New-TempFile by Peter Rossi 20 Apr 2011 07:50 AM UTC
    by 3 users

    Advanced Event 10
    2 Comments

    Advanced function to create temp files from data piplined or inputted into it. Option to open the file in notepad Option to specify the encoding type

  • sendto-tempfile.ps1 by Scott A. Alvarino 20 Apr 2011 07:26 PM UTC
    by 2 users

    Advanced Event 10
    1 Comments

    This function saves the pipeline to a temp file and lets you immediately view if a value of notepad is supplied for -value

  • advanced10.ps1 by Tim Parkinson 20 Apr 2011 06:01 PM UTC
    by 2 users

    Advanced Event 10

    An advanced function which creates the log file and writes out to it. By default uses temporary folder of the user, and a GUID as the filename with a .txt extension. All of these may be overridden by parameters (including a scriptblock to generate the filename). Supports encoding and whatif, verbose and debug parameters. Allows display of the program in notepad (may be overridden) and returns the filename that is written to.