Created
March 4, 2018 03:41
-
-
Save wvanbesien/eebda08e9de50847a78d544e396ced52 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.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