Skip to content

New GitHubTeam

Howard Wolosky edited this page Oct 5, 2020 · 1 revision

New-GitHubTeam

SYNOPSIS

Creates a team within an organization on GitHub.

SYNTAX

ParentId (Default)

New-GitHubTeam [-OrganizationName] <String> [-TeamName] <String> [-Description <String>]
 [-MaintainerName <String[]>] [-RepositoryName <String[]>] [-Privacy <String>] [-ParentTeamId <Int64>]
 [-AccessToken <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

ParentName

New-GitHubTeam [-OrganizationName] <String> [-TeamName] <String> [-Description <String>]
 [-MaintainerName <String[]>] [-RepositoryName <String[]>] [-Privacy <String>] [-ParentTeamName <String>]
 [-AccessToken <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Creates a team within an organization on GitHub.

The Git repo for this module can be found here: http://aka.ms/PowerShellForGitHub

EXAMPLES

EXAMPLE 1

New-GitHubTeam -OrganizationName PowerShell -TeamName 'Developers'

Creates a new GitHub team called 'Developers' in the 'PowerShell' organization.

EXAMPLE 2

$teamName = 'Team1'
$teamName | New-GitHubTeam -OrganizationName PowerShell

You can also pipe in a team name that was returned from a previous command.

EXAMPLE 3

$users = Get-GitHubUsers -OrganizationName PowerShell
$users | New-GitHubTeam -OrganizationName PowerShell -TeamName 'Team1'

You can also pipe in a list of GitHub users that were returned from a previous command.

PARAMETERS

-AccessToken

If provided, this will be used as the AccessToken for authentication with the REST Api. Otherwise, will attempt to use the configured value or will run unauthenticated.

Type: System.String
Parameter Sets: (All)
Aliases:

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

-Description

The description for the team.

Type: System.String
Parameter Sets: (All)
Aliases:

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

-MaintainerName

A list of GitHub user names for organization members who will become team maintainers.

Type: System.String[]
Parameter Sets: (All)
Aliases: UserName

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

-OrganizationName

The name of the organization to create the team in.

Type: System.String
Parameter Sets: (All)
Aliases:

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

-ParentTeamId

The ID of the team to set as the parent team.

Type: System.Int64
Parameter Sets: ParentId
Aliases: TeamId

Required: False
Position: Named
Default value: 0
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ParentTeamName

The name of a team to set as the parent team.

Type: System.String
Parameter Sets: ParentName
Aliases:

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

-Privacy

The level of privacy this team should have.

Type: System.String
Parameter Sets: (All)
Aliases:

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

-RepositoryName

The name of repositories to add the team to.

Type: System.String[]
Parameter Sets: (All)
Aliases:

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

-TeamName

The name of the team.

Type: System.String
Parameter Sets: (All)
Aliases:

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: cf

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: wi

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

GitHub.Team

GitHub.User

System.String

OUTPUTS

GitHub.Team

NOTES

RELATED LINKS

PowerShellForGitHub

Docs

PowerShellForGitHub

Functions

Clone this wiki locally