Get-LMPortalVersion
Syntax
Section titled “Syntax”Get-LMPortalVersion [-Force] [-ProgressAction <ActionPreference>] [<CommonParameters>]Description
Section titled “Description”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.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”$version = Get-LMPortalVersionWrite-Host "Portal version: $($version.RawVersion)"Example 2
Section titled “Example 2”$version = Get-LMPortalVersion -Forceif ($version.Major -ge 231) { Write-Host "Feature supported" }Parameters
Section titled “Parameters”-Force
Section titled “-Force”Forces a fresh API call to retrieve the version, bypassing the cached value.
Type: SwitchParameterParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False-ProgressAction
Section titled “-ProgressAction”Fill ProgressAction Description
Type: ActionPreferenceParameter Sets: (All)Aliases: proga
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseCommonParameters
Section titled “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
Section titled “Inputs”Outputs
Section titled “Outputs”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.