Scripts By Mohit Kataria

  • Beginner_Event_10 by Mohit Kataria 21 Apr 2011 06:03 PM UTC
    by 2 users

    Beginner Event 10
    1 Comments

    The script measures a sleep command for 5 runs and displays the user the average of all the runs in milliseconds. We can specify the number of runs as well as sleep time for the sleep command in this script.

  • Advanced_Event_9 by Mohit Kataria 20 Apr 2011 07:16 PM UTC
    by 2 users

    Advanced Event 9

    This script creates a daily log file for each user who is working on the system. It creates the log files in a folder called HSGLogFiles in the logged in user's My document folder. If the folder HSGLogFiles does not exist, the script creates it. Then it creates a log file after checking the existence of the same in the folder HSGFiles. If the file with same name does not exist, it creates it else displays a message to the user to use a unique file name.

  • Beginner_Event_9 by Mohit Kataria 20 Apr 2011 07:09 PM UTC
    by 2 users

    Beginner Event 9
    1 Comments

    This script creates a daily log file in YYYYMMDD.txt format. It also checks for the existence of file and creates only when it is not present at the mentioned location. If present, if displays a message to the user for using a unique file name.

  • CalculateDays.ps1 by Mohit Kataria 18 Apr 2011 06:30 PM UTC
    by 2 users

    Beginner Event 7

    I'm new to Powershell and still in learning phase. Still I thought to participate for fun. Let's see how far I go. This single line script calculates the difference in days between today (system date) and 31st of July 2011 and displays a message to the user. I'm not sure how can we parametrize it in single line, yet taking inputs.