Skip to content

Get‑ShpModelName

Raimund edited this page Jun 12, 2026 · 1 revision

SYNOPSIS

Returns cached Copilot model ids for the -Model argument completer.

SYNTAX

Get-ShpModelName [[-Endpoint] <String>] [-Refresh] [<CommonParameters>]

DESCRIPTION

On first call (or with -Refresh) the list is fetched via Get-ShpModel and stored in the module-scoped $script:ModelNameCache. Subsequent calls return the cached values without a network round-trip. Used by the Invoke-Shp -Model tab-completer; can also be called directly to pre-warm or refresh the cache.

EXAMPLES

EXAMPLE 1

Get-ShpModelName

Returns the cached model ids, fetching them once on first use.

EXAMPLE 2

Get-ShpModelName -Refresh

Re-fetches the model list and refreshes the cache.

PARAMETERS

-Endpoint

Endpoint passed to Get-ShpModel when the cache is (re)built. Default: Enterprise.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: Enterprise
Accept pipeline input: False
Accept wildcard characters: False

-Refresh

Force a re-fetch even if the cache is already populated.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

System.String

The cached model ids.

NOTES

RELATED LINKS

Get-ShpModel

Invoke-Shp

Clone this wiki locally