In my scripts, I often check to see if the script file was written earlier before I start from scratch. Often I can at least find some of what I need using Google or other means. Then I adapt what I find in my needs and put it into production. As a best practice, I comment on my code and include information about the author (I'm not a fan of plagiarism). However, the question arises of how and when it is appropriate to add / change this designation of the author. I will use a sample script from Ed Wilson outside his blog for reference:
Function Get-OutlookCalendar { <# .Synopsis This function returns appointment items from default Outlook profile .Description This function returns appointment items from default Outlook profile. It uses the Outlook interop assembly to use the olFolderCalendar enumeration. It creates a custom object consisting of Subject, Start, Duration, Location for each appointment item. .Example Get-OutlookCalendar | where-object { $_.start -gt [datetime]"5/10/2011" -AND $_.start -lt ` [datetime]"5/17/2011" } | sort-object Duration Displays subject, start, duration and location for all appointments that occur between 5/10/11 and 5/17/11 and sorts by duration of the appointment. The sort is shortest appointment on top. .Notes NAME: Get-OutlookCalendar AUTHOR: ed wilson, msft LASTEDIT: 05/10/2011 08:36:42 KEYWORDS: Microsoft Outlook, Office HSG: HSG-05-24-2011 .Link Http:
I consider the authorโs field as a common ground for this script, as this is the one who wrote and understands it. Is there a general rule about how much the script has changed before it makes sense to list the original author? Or are they always authors, and then you are an editor?
In the case of the latter, what is the appropriate way to indicate this? Did you add a line under the author called "Editor" and change the last edit label? How to properly document your contributions? Is there a documented practice?
scripting powershell
Colyn1337
source share