Skip to content

Get-LMPortalVersion

Terminal window
Get-LMPortalVersion [-Force] [-ProgressAction <ActionPreference>] [<CommonParameters>]

The Get-LMPortalVersion function makes a lightweight API call to retrieve the portal version from the x-server-version response header. The version is cached in $Script:LMAuth.Version for the duration of the session to avoid repeated API calls.

Terminal window
$version = Get-LMPortalVersion
Write-Host "Portal version: $($version.RawVersion)"
Terminal window
$version = Get-LMPortalVersion -Force
if ($version.Major -ge 231) { Write-Host "Feature supported" }

Forces a fresh API call to retrieve the version, bypassing the cached value.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Fill ProgressAction Description

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

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

Returns a PSCustomObject with RawVersion (string), Major (int), and Minor (int) properties.

Section titled “Returns a PSCustomObject with RawVersion (string), Major (int), and Minor (int) properties.”

This is a private function used internally by the module.