Scripts By Daniel Cruz
Measure-Average.ps1 by Daniel Cruz 22 Apr 2011 02:07 AM UTCby 2 users
Beginner Event 102 Comments
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 UTCby 2 users
Beginner Event 83 Comments
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 UTCby 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 UTCby 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 UTCby 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 UTCby 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 UTCby 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 UTCby 3 users
Beginner Event 31 Comments
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 UTCby 2 users
Beginner Event 12 Comments
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 UTCby 2 users
Beginner Event 23 Comments
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.
- Advanced Event 1 (83)
- Advanced Event 10 (34)
- Advanced Event 2 (63)
- Advanced Event 3 (50)
- Advanced Event 4 (51)
- Advanced Event 5 (38)
- Advanced Event 6 (51)
- Advanced Event 7 (39)
- Advanced Event 8 (27)
- Advanced Event 9 (46)
- Beginner Event 1 (149)
- Beginner Event 10 (85)
- Beginner Event 2 (139)
- Beginner Event 3 (100)
- Beginner Event 4 (108)
- Beginner Event 5 (93)
- Beginner Event 6 (102)
- Beginner Event 7 (108)
- Beginner Event 8 (90)
- Beginner Event 9 (92)