Intellisense/InstanceNames.Autocompleter.ps1

1
2
3
4
5
6
7
8
9
10
$ScriptBlock = {
    param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)
    $Global:Instances.Name -match $wordToComplete
}
$Completer = @{
    CommandName   = @('Select-Instance')
    ParameterName = 'InstanceNames'
    ScriptBlock   = $ScriptBlock
}
Register-ArgumentCompleter @Completer