Skip to main content

Get-KeldorLinuxDistribution

SYNOPSIS​

Gets normalized Linux distribution information.

SYNTAX​

Local (Default)​

Get-KeldorLinuxDistribution [<CommonParameters>]

ComputerName​

Get-KeldorLinuxDistribution [-ComputerName] <String[]> [-Credential <PSCredential>]
[<CommonParameters>]

PSSession​

Get-KeldorLinuxDistribution -PSSession <PSSession[]> [<CommonParameters>]

DESCRIPTION​

Parses Linux os-release data as inert text and returns normalized distribution identity. On Windows and macOS, the command writes a non-terminating InvalidOperation error and returns no success object.

EXAMPLES​

EXAMPLE 1​

Get-KeldorLinuxDistribution

Gets distribution information on Linux.

EXAMPLE 2​

Get-PSSession | Get-KeldorLinuxDistribution | Select-Object ComputerName, PrettyName, VersionId

Gets distribution information through existing Linux sessions.

PARAMETERS​

-ComputerName​

Specifies computers reachable through configured PowerShell remoting. Keldor must be installed on each target.

Type: String[]
Parameter Sets: ComputerName
Aliases: HostName, DnsHostName

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-PSSession​

Specifies existing PowerShell sessions to reuse. Keldor must be installed in each remote session.

Type: PSSession[]
Parameter Sets: PSSession
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Credential​

Specifies a credential for ComputerName remoting.

Type: PSCredential
Parameter Sets: ComputerName
Aliases:

Required: False
Position: Named
Default value: None
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​

System.String and System.Management.Automation.Runspaces.PSSession.​

OUTPUTS​

Keldor.LinuxDistribution​

NOTES​

This command is Linux-specific. It never executes os-release as a shell script.

ALIASES​

None.

PLATFORM APPLICABILITY​

Linux only. The command is available on every supported platform so it can target remote Linux systems. A local call on Windows or macOS writes a non-terminating InvalidOperation error and returns no success object.

POWERSHELL COMPATIBILITY​

See PowerShell compatibility for the supported runtime policy. PowerShell 7.6 LTS is preferred.

https://docs.keldor.dev/powershell/keldor/Get-KeldorLinuxDistribution