Skip to content

Instantly share code, notes, and snippets.

@wvanbesien
Created March 4, 2018 03:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wvanbesien/eebda08e9de50847a78d544e396ced52 to your computer and use it in GitHub Desktop.
Save wvanbesien/eebda08e9de50847a78d544e396ced52 to your computer and use it in GitHub Desktop.
<#
.SYNOPSIS
This function gives some cheap flattery.
.DESCRIPTION
Use this command to give some cheap flattery. the name parameter is mandatory
.PARAMETER name
Specify the name that should be used for the compliment
.EXAMPLE
new-compliment -name "Herman"
#>
function new-compliment {
[CmdletBinding(SupportsShouldProcess=$true,ConfirmImpact="High")]
param(
[Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Position = 0)]$name
)
Process {
if ($PSCmdlet.ShouldProcess($name)) {
Write-Host "You are great, $name"
}
}
}
Export-ModuleMember new-compliment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment