Private/ArgumentCompleter/Get-OrbitAcSbGraphLicenseServicePlan.ps1
# OrbitMSGraphLicenseServicePlans - License Service Plan function Get-OrbitAcSbGraphLicenseServicePlan { param ( $commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters ) if (-not $global:OrbitMicrosoft365LicenseservicePlans) { $global:OrbitMicrosoft365LicenseservicePlans = Get-Microsoft365LicenseServicePlan -WarningAction SilentlyContinue } $Values = ($global:OrbitMicrosoft365LicenseservicePlans).ServicePlanName.Split('', [System.StringSplitOptions]::RemoveEmptyEntries) | Sort-Object -Unique $Values | Where-Object { $_ -like "*$WordToComplete*" } | ForEach-Object { $_ } } # [ArgumentCompleter({ Get-OrbitAcSbGraphLicenseServicePlan @args })] Register-ArgumentCompleter -CommandName Test-GraphUserLicense -ParameterName ServicePlan -ScriptBlock { Get-OrbitAcSbGraphLicenseServicePlan @args } Register-ArgumentCompleter -CommandName Test-Microsoft365LicenseContainsServicePlan -ParameterName ServicePlan -ScriptBlock { Get-OrbitAcSbGraphLicenseServicePlan @args } Register-ArgumentCompleter -CommandName Get-Microsoft365TenantLicense -ParameterName ServicePlan -ScriptBlock { Get-OrbitAcSbGraphLicenseServicePlan @args } Register-ArgumentCompleter -CommandName Set-GraphUserLicenseServicePlan -ParameterName Enable -ScriptBlock { Get-OrbitAcSbGraphLicenseServicePlan @args } Register-ArgumentCompleter -CommandName Set-GraphUserLicenseServicePlan -ParameterName Disable -ScriptBlock { Get-OrbitAcSbGraphLicenseServicePlan @args } |