Skip to content

Instantly share code, notes, and snippets.

@bgshacklett
Created January 20, 2014 21:20
Show Gist options
  • Save bgshacklett/8529451 to your computer and use it in GitHub Desktop.
Save bgshacklett/8529451 to your computer and use it in GitHub Desktop.
Troubleshooting PS Aliases and Pipeline bindings
function Test-AliasBinding
{
[CmdletBinding()]
param(
[Alias("DNSHostName")]
[Parameter(
Mandatory=$True,
#ValueFromPipeline = $True,
ValueFromPipelineByPropertyName=$True
)]
[string] $ComputerName
)
process {
"Processing: $ComputerName"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment