Last Update: September 7, 2012
PowerShell Version: 3.0
| Class | Library |
| Instructor Use | PSv3.psm1 |
20417: Upgrading Your Skills to MCSA Windows Server 2012 | 20417.psm1 |
.SYNOPSIS
Used to quantify script usage.
.DESCRIPTION
===============================================================================
Automation Quantification Function
Author: Jason A. Yoder
Version 1.0
-------------------------------------------------------------------------------
This code is designed to be added to existing scripts so they can send
usage information to a central usage file. This will help in quantifying
your automation efforts to management.
Requirements:
- Network location where the file can be stored and accessed for
write operation.
- Data file location must be online.
- The calling statement needs to be modified to reflect your
scripts information.
===============================================================================
.PARAMETER ScriptName
The name of the script/cmdlet/function that is being run.
.PARAMETER TimeSaved_Min
Estimated number of minutes of manual labor this script
has saved the user.
.PARAMETER Server
The name of the server where the log file is stored.
.PARAMETER Automatic
To help distinguish from manually ran scripts and those that are
performed via a scheduled task or other automated launch
method. Set to $True if automatic of $False if
manually initiated.
.PARAMETER Path
The full path to the logfile.
ex: \\indy-SVR1\ScriptData
.PARAMETER LogFile
The name of the file to record the data.
.EXAMPLE
Write-Quantification "TestScript1.PS1" 10 $env:COMPUTERNAME $True "\\Indy-SVR1\PSData\" "2012Data.csv"
Write to the logfile 2012Data.csv on the server (Extracting the servers name for you)
in the share PSData. The name of the script entered in the log is
"TestScript1.PS1". It is recording 10 minuets of saved time.
No comments:
Post a Comment