Skip to content

Commit

Permalink
Update copyright and license headers (PowerShell#6134)
Browse files Browse the repository at this point in the history
Based on standard practices, we need to have a copyright and license notice at the top of each source file. Removed existing copyrights and updated/added copyright notices for .h, .cpp, .cs, .ps1, and .psm1 files.

Updated module manifests for consistency to have Author = "PowerShell" and Company = "Microsoft Corporation". Removed multiple line breaks.

Separate PR coming to update contribution document for new source files: PowerShell#6140

Manually reviewed each change.

Fix PowerShell#6073
  • Loading branch information
SteveL-MSFT authored and TravisEz13 committed Feb 13, 2018
1 parent 0ad9fc9 commit c1c5344
Show file tree
Hide file tree
Showing 1,567 changed files with 3,484 additions and 5,749 deletions.
10 changes: 3 additions & 7 deletions build.psm1
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

# On Unix paths is separated by colon
# On Windows paths is separated by semicolon
$script:TestModulePathSeparator = [System.IO.Path]::PathSeparator
Expand Down Expand Up @@ -873,7 +876,6 @@ function Get-PSOutput {
}
}


function Get-PesterTag {
param ( [Parameter(Position=0)][string]$testbase = "$PSScriptRoot/test/powershell" )
$alltags = @{}
Expand Down Expand Up @@ -1362,7 +1364,6 @@ function Test-PSPesterResults
}
}


function Start-PSxUnit {
[CmdletBinding()]param(
[string] $SequentialTestResultsFile = "SequentialXUnitResults.xml",
Expand Down Expand Up @@ -1430,7 +1431,6 @@ function Start-PSxUnit {
}
}


function Install-Dotnet {
[CmdletBinding()]
param(
Expand Down Expand Up @@ -1914,7 +1914,6 @@ function Start-ResGen
}
}


function Find-Dotnet() {
$originalPath = $env:PATH
$dotnetPath = if ($Environment.IsWindows) { "$env:LocalAppData\Microsoft\dotnet" } else { "$env:HOME/.dotnet" }
Expand Down Expand Up @@ -1972,7 +1971,6 @@ function Convert-TxtResourceToXml
}
}


function script:Use-MSBuild {
# TODO: we probably should require a particular version of msbuild, if we are taking this dependency
# msbuild v14 and msbuild v4 behaviors are different for XAML generation
Expand All @@ -1991,7 +1989,6 @@ function script:Use-MSBuild {
Set-Alias msbuild $frameworkMsBuildLocation -Scope Script
}


function script:log([string]$message) {
Write-Host -Foreground Green $message
#reset colors for older package to at return to default after error message on a compilation error
Expand Down Expand Up @@ -2534,7 +2531,6 @@ function Restore-PSModule
}
}


$script:RESX_TEMPLATE = @'
<?xml version="1.0" encoding="utf-8"?>
<root>
Expand Down
4 changes: 3 additions & 1 deletion demos/Apache/Apache/Apache.psm1
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

#Region utility functions

$global:sudocmd = "sudo"
Expand Down Expand Up @@ -216,7 +219,6 @@ Function Restart-ApacheHTTPServer{

}


Function Get-ApacheModule{
$cmd = GetApacheCmd

Expand Down
3 changes: 3 additions & 0 deletions demos/Apache/apache-demo.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

Import-Module $PSScriptRoot/Apache/Apache.psm1

#list Apache Modules
Expand Down
5 changes: 4 additions & 1 deletion demos/Azure/Azure-Demo.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
### The techniques used in this demo are documented at
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

### The techniques used in this demo are documented at
### https://azure.microsoft.com/en-us/documentation/articles/powershell-azure-resource-manager/

### Import AzureRM.Profile.NetCore.Preview and AzureRM.Resources.NetCore.Preview modules.
Expand Down
2 changes: 2 additions & 0 deletions demos/DSC/dsc-demo.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

#Get Distro type and set distro-specific variables
$OSname = Get-Content "/etc/os-release" |Select-String -Pattern "^Name="
Expand Down
5 changes: 4 additions & 1 deletion demos/Docker-PowerShell/Docker-PowerShell.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

# This is a short example of the Docker-PowerShell module. The same cmdlets may be used to manage both local & remote machines, including both Windows & Linux hosts
# The only difference between them is the example container image is pulled & run.

Expand Down Expand Up @@ -26,4 +29,4 @@ Get-Container | Where-Object State -eq "exited" | Remove-Container
Remove-ContainerImage hello-world

# And list the container images left on the container host
Get-ContainerImage
Get-ContainerImage
5 changes: 4 additions & 1 deletion demos/SystemD/SystemD/SystemD.psm1
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

Function Get-SystemDJournal {
[CmdletBinding()]
param (
Expand All @@ -15,4 +18,4 @@ Function Get-SystemDJournal {
{
$Result
}
}
}
3 changes: 3 additions & 0 deletions demos/SystemD/journalctl-demo.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

Import-Module $PSScriptRoot/SystemD/SystemD.psm1

#list recent journal events
Expand Down
4 changes: 2 additions & 2 deletions demos/crontab/CronTab/CronTab.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ CompatiblePSEditions = @('Core')
GUID = '508bb97f-de2e-482e-aae2-01caec0be8c7'

# Author of this module
Author = 'Microsoft'
Author = 'PowerShell'

# Company or vendor of this module
CompanyName = 'Unknown'
CompanyName = 'Microsoft Corporation'

# Copyright statement for this module
Copyright = 'Copyright (c) Microsoft Corporation. All rights reserved.'
Expand Down
2 changes: 2 additions & 0 deletions demos/crontab/CronTab/CronTab.psm1
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

using namespace System.Collections.Generic
using namespace System.Management.Automation
Expand Down
2 changes: 2 additions & 0 deletions demos/crontab/crontab.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

Import-Module $PSScriptRoot/CronTab/CronTab.psd1

Expand Down
5 changes: 4 additions & 1 deletion demos/dsc.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

# DSC MOF Compilation
# DSC Configuration() script that:
# Defines base configuration users, groups, settings
Expand All @@ -8,4 +11,4 @@
# Show the .ps1
# Run the .ps1 to generate a MOF
# Apply the MOF locally with Start-DSCConfiguration
# Show the newly configured state
# Show the newly configured state
7 changes: 5 additions & 2 deletions demos/powershellget/PowerShellGet.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#region find, install, update, uninstall the PowerShell scripts from an online repository.
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

#region find, install, update, uninstall the PowerShell scripts from an online repository.
# Value: equivalent of pypi

# List of PowerShellGet commands
Expand Down Expand Up @@ -74,4 +77,4 @@ Set-PSRepository -Name "myPrivateGallery" -InstallationPolicy "Untrusted"
# Remove a private feed
Unregister-PSRepository -Name "myPrivateGallery"

#endregion
#endregion
3 changes: 3 additions & 0 deletions demos/python/class1.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

#
# Wrap Python script in such a way to make it easy to
# consume from PowerShell
Expand Down
4 changes: 3 additions & 1 deletion demos/python/demo_script.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

#
# Demo simple interoperation between PowerShell and Python

Expand Down Expand Up @@ -55,7 +58,6 @@ cat inline_python.ps1
# and run it
./inline_python


####################################
# cleanup
rm hi
3 changes: 3 additions & 0 deletions demos/python/inline_python.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

#
# An example showing inline Python code in a PowerShell script
#
Expand Down
4 changes: 3 additions & 1 deletion demos/rest/rest.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

#-----------------

function Get-Issue
Expand Down
3 changes: 3 additions & 0 deletions docker/tests/container.tests.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

Import-module -Name "$PSScriptRoot\containerTestCommon.psm1" -Force
$script:linuxContainerTests = Get-LinuxContainer
$script:windowsContainerTests = Get-WindowsContainer
Expand Down
5 changes: 3 additions & 2 deletions docker/tests/containerTestCommon.psm1
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

$script:forcePull = $true
# Get docker Engine OS
function Get-DockerEngineOs
Expand Down Expand Up @@ -87,7 +90,6 @@ function Get-WindowsContainer
}
}


$script:repoName = 'microsoft/powershell'
function Get-RepoName
{
Expand Down Expand Up @@ -251,7 +253,6 @@ function Test-PSPackage
$packageLocationStubName = 'PACKAGELOCATIONSTUB'
$packageLocationStubValue = $PSPackageLocation


$results = @{}
$returnValue = $true

Expand Down
6 changes: 3 additions & 3 deletions docs/host-powershell/sample-dotnet1.1/Logic/UseRunspace.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/********************************************************************++
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using System.Management.Automation;
using System.Management.Automation.Runspaces;
Expand Down
5 changes: 2 additions & 3 deletions docs/host-powershell/sample-dotnet1.1/MyApp/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/********************************************************************++
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System.Management.Automation;
using System.Reflection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/********************************************************************++
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using System.Management.Automation;
using System.Management.Automation.Runspaces;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/********************************************************************++
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System.Management.Automation;
using System.Reflection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/********************************************************************++
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using System.Management.Automation;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*============================================================================
* Copyright (c) Microsoft Corporation. All rights reserved.
*============================================================================
*/
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System.Diagnostics;
using System.Reflection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*============================================================================
* Copyright (c) Microsoft Corporation. All rights reserved.
*============================================================================
*/
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#region Using directives

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*============================================================================
* Copyright (c) Microsoft Corporation. All rights reserved.
*============================================================================
*/
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#region Using directives

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*============================================================================
* Copyright (c) Microsoft Corporation. All rights reserved.
*============================================================================
*/
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#region Using directives

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*============================================================================
* Copyright (c) Microsoft Corporation. All rights reserved.
*============================================================================
*/
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#region Using directives
using System;
Expand Down Expand Up @@ -804,7 +802,6 @@ internal void ThrowTerminatingError(Exception exception, string operation)
/// </summary>
internal const string ClassNameSessionSet = "ClassNameSessionSet";


/// <summary>
/// resource Uri session set name
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*============================================================================
* Copyright (c) Microsoft Corporation. All rights reserved.
*============================================================================
*/
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#region Using directives

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*============================================================================
* Copyright (c) Microsoft Corporation. All rights reserved.
*============================================================================
*/
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#region Using directives

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*============================================================================
* Copyright (c) Microsoft Corporation. All rights reserved.
*============================================================================
*/
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#region Using directives

Expand Down
Loading

0 comments on commit c1c5344

Please sign in to comment.