Scripts By Daniel Cruz

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

    Beginner Event 10

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

  • Get-FileInfo by Daniel Cruz 20 Apr 2011 02:36 AM UTC
    by 2 users

    Beginner Event 8

    This function generates a Csv disk utilization report on the files in a specifed folder.

  • Beginner Event 7 - Snippet by Daniel Cruz 18 Apr 2011 06:29 PM UTC
    by 2 users

    Beginner Event 7

    This single line of code returns the amount of days remaining until the end of the fiscal year.

  • New-LogFile.ps1 by Daniel Cruz 18 Apr 2011 05:35 PM UTC
    by 2 users

    Beginner Event 9

    The entry is designed to be used as a function in a script: The New-LogFile function creates a new log file named <year><month><day>.log in the current directory. The file path and extension can be set using the Path and Ext parameters when you call the function. If the filename already exists, you will be prompted to either overwrite the existing file or rename the new log file.

  • Get-UpdateErrors.ps1 by Daniel Cruz 17 Apr 2011 12:21 AM UTC
    by 2 users

    Beginner Event 6

    Returns strings from the WindowsUpdate.log file that contain Fatal errors.

  • Get-ComputerInfo by Daniel Cruz 15 Apr 2011 05:00 AM UTC
    by 2 users

    Beginner Event 5

    Collects the user name, computer name, domain name, and the operating system from a number of computers and saves the output to an ASCII encoded text file.

  • Get-ServiceAccounts.ps1 by Daniel Cruz 13 Apr 2011 08:40 PM UTC
    by 2 users

    Beginner Event 4

    Reports any service using a non-standard account on a single or multiple computers. If the All switch is used, all services and accounts will be returned for the computer specified. Standard accounts are defined as "LocalSystem", "NT AUTHORITY\LocalService" and "NT AUTHORITY\NetworkService".

  • Beginner3_2011.ps1 by Daniel Cruz 13 Apr 2011 02:46 AM UTC
    by 3 users

    Beginner Event 3

    Returns a object or file representing all of the enabled event logs on the computer specified. The logs are sorted by the time the log was last written to, most recently written to are on top. Then by file size descending from the largest file and then if the log is a classic log or not.

  • Beginner2_2011.ps1 by Daniel Cruz 12 Apr 2011 12:19 AM UTC
    by 2 users

    Beginner Event 1

    Returns a table of pausable services. The table contains the service status, name and display name. The script returns services on the local computer unless another computer is specified using the ComputerName parameter.

  • Beginner1_2011.ps1 by Daniel Cruz 11 Apr 2011 01:26 AM UTC
    by 2 users

    Beginner Event 2

    Identifies if the file version for a process is a private or public build. The default output is an object representing the process 'notepad' on the local computer. The ProcessName parameter returns data for a specified process name(s). To use Beginner1_2011.ps1 you must have sufficient priviliges to start the specified process.