I was completing an online training from a website on PowerShell. Instruction completed an advanced function and used parameters. Instruction could use these parameters using tab completion features but I can not.
When I copy param code outside function block, I can use tab completion. Works fine with other code examples so should not be a PowerShell console issue.
Is there anything wrong with this example code:
function Get-DJOSInfo {
[cmdletBinding(SupportsShouldProcess=$True,ConfirmImpact='Low')]
param (
[Parameter(Mandatory=$True,
ValueFromPipeline=$True,
ValueFromPipelineByPropertyName=$True)]
[Alias('hostname')]
[ValidateLength(5,20)]
[ValidateCount(1,10)]
[string[]]$computerName,
[switch]$nameLog
)
I can paste complete code, if required.