Skip to content

Remove GitHubTeam

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

Remove-GitHubTeam

SYNOPSIS

Removes a team from an organization on GitHub.

SYNTAX

TeamSlug (Default)

Remove-GitHubTeam [-OrganizationName] <String> -TeamSlug <String> [-Force] [-AccessToken <String>] [-WhatIf]
 [-Confirm] [<CommonParameters>]

TeamName

Remove-GitHubTeam [-OrganizationName] <String> [-TeamName] <String> [-Force] [-AccessToken <String>] [-WhatIf]
 [-Confirm] [<CommonParameters>]

DESCRIPTION

Removes a team from an organization on GitHub.

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

EXAMPLES

EXAMPLE 1

Remove-GitHubTeam -OrganizationName PowerShell -TeamName Developers

Removes the 'Developers' GitHub team from the 'PowerShell' organization.

EXAMPLE 2

Remove-GitHubTeam -OrganizationName PowerShell -TeamName Developers -Force

Removes the 'Developers' GitHub team from the 'PowerShell' organization without prompting.

EXAMPLE 3

$team = Get-GitHubTeam -OrganizationName PowerShell -TeamName Developers
$team | Remove-GitHubTeam -Force

You can also pipe in a GitHub team that was 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

-Force

If this switch is specified, you will not be prompted for confirmation of command execution.

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

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

-OrganizationName

The name of the organization the team is in.

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

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

-TeamName

The name of the team to remove.

Type: System.String
Parameter Sets: TeamName
Aliases:

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

-TeamSlug

The slug (a unique key based on the team name) of the team to remove.

Type: System.String
Parameter Sets: TeamSlug
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
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.Organization

GitHub.Team

OUTPUTS

None

NOTES

RELATED LINKS

PowerShellForGitHub

Docs

PowerShellForGitHub

Functions

Clone this wiki locally