Skip to content

Get-GitHubEnterprise

SYNOPSIS

Retrieves GitHub Enterprise instance details for the authenticated user.

SYNTAX

List enterprises for the authenticated user (Default)

Get-GitHubEnterprise [-Context <Object>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

Get enterprise by name

Get-GitHubEnterprise -Name <String> [-Context <Object>] [-ProgressAction <ActionPreference>]
 [<CommonParameters>]

DESCRIPTION

Retrieves detailed information about GitHub Enterprise instances available to the authenticated user. By default, the command lists all accessible instances, including metadata such as the enterprise name, slug, URL, and creation date. If a specific enterprise name is provided, details about that single instance are returned.

EXAMPLES

EXAMPLE 1

Get-GitHubEnterprise

Output:

Name              : My Enterprise
Slug              : my-enterprise
URL               : https://github.com/enterprises/my-enterprise
CreatedAt         : 2022-01-01T00:00:00Z

Name              : Another Enterprise
Slug              : another-enterprise
URL               : https://github.com/enterprises/another-enterprise
CreatedAt         : 2022-01-01T00:00:00Z

Retrieves details about all GitHub Enterprise instances for the user.

EXAMPLE 2

Get-GitHubEnterprise -Name 'my-enterprise'

Output:

Name              : My Enterprise
Slug              : my-enterprise
URL               : https://github.com/enterprises/my-enterprise
CreatedAt         : 2022-01-01T00:00:00Z

Retrieves details about the GitHub Enterprise instance named 'my-enterprise'.

PARAMETERS

-Name

The name (slug) of the GitHub Enterprise instance to retrieve.

Type: String
Parameter Sets: Get enterprise by name
Aliases: Slug

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

-Context

The context to run the command in. Used to get the details for the API call. Can be either a string or a GitHubContext object.

Type: Object
Parameter Sets: (All)
Aliases:

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

-ProgressAction

{{ 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

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

GitHubEnterprise

NOTES

An object containing detailed information about the GitHub Enterprise instance, including billing info, URLs, and metadata.

https://psmodule.io/GitHub/Functions/Enterprise/Get-GitHubEnterprise/