Private/ArgumentCompleter/Get-OrbitAcSbGraphLicense.ps1
# OrbitMSGraphLicenses - License function Get-OrbitAcSbGraphLicense { param ( $commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters ) if (-not $global:OrbitMicrosoft365Licenses) { $global:OrbitMicrosoft365Licenses = Get-Microsoft365License -WarningAction SilentlyContinue } $Values = ($global:OrbitMicrosoft365Licenses).ParameterName.Split('', [System.StringSplitOptions]::RemoveEmptyEntries) | Sort-Object $Values | Where-Object { $_ -like "*$WordToComplete*" } | ForEach-Object { $_ } } # [ArgumentCompleter({ Get-OrbitAcSbGraphLicense @args })] Register-ArgumentCompleter -CommandName Set-GraphUserLicense -ParameterName Add -ScriptBlock { Get-OrbitAcSbGraphLicense @args } Register-ArgumentCompleter -CommandName Set-GraphUserLicense -ParameterName Remove -ScriptBlock { Get-OrbitAcSbGraphLicense @args } Register-ArgumentCompleter -CommandName Test-GraphUserLicense -ParameterName License -ScriptBlock { Get-OrbitAcSbGraphLicense @args } Register-ArgumentCompleter -CommandName Test-Microsoft365LicenseContainsServicePlan -ParameterName License -ScriptBlock { Get-OrbitAcSbGraphLicense @args } Register-ArgumentCompleter -CommandName Get-Microsoft365TenantLicense -ParameterName License -ScriptBlock { Get-OrbitAcSbGraphLicense @args } Register-ArgumentCompleter -CommandName New-TeamsCommonAreaPhone -ParameterName License -ScriptBlock { Get-OrbitAcSbGraphLicense @args } Register-ArgumentCompleter -CommandName Set-TeamsCommonAreaPhone -ParameterName License -ScriptBlock { Get-OrbitAcSbGraphLicense @args } Register-ArgumentCompleter -CommandName New-TeamsResourceAccount -ParameterName License -ScriptBlock { Get-OrbitAcSbGraphLicense @args } Register-ArgumentCompleter -CommandName Set-TeamsResourceAccount -ParameterName License -ScriptBlock { Get-OrbitAcSbGraphLicense @args } |