Intellisense/InstanceType.Autocompleter.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
$ScriptBlock = {
  param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)
  (Get-CmEc2InstanceTypes) -match $wordToComplete
}

$Completer = @{
    CommandName = @(
        'Compare-CMEC2WindowsSpotPricingToOndemand'
        'Get-CmEc2InstanceTypes'
        'Get-Ec2WindowsOndemandPrice'
        'New-CmEC2Instance'
        'Set-CMEC2InstanceType'
    )
    ParameterName = 'InstanceType'
    ScriptBlock = $ScriptBlock
    }
Register-ArgumentCompleter @Completer