Remove-TwitterListMember
SYNOPSIS
Removes one or more users from a list.
SYNTAX
ById (Default)
Remove-TwitterListMember -Id <String> -UserName <String[]> [-WhatIf] [-Confirm] [<CommonParameters>]
ByList
Remove-TwitterListMember -List <List> -UserName <String[]> [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
Removes one or more users from a list.
The authenticated user must own the list to be able to remove members from it.
Please note that there can be issues with lists that rapidly remove and add memberships. Take care when using these methods such that you are not too rapidly switching between removals and adds on the same list.
EXAMPLES
Example 1
PS > Remove-TwitterListMember -Id 1397040831777984512 -UserName thedavecarroll
Id : 1397040831777984512
CreatedAt : 5/24/2021 11:04:24 PM
Slug : sample-list-10878
Name : Updated-List-Name
FullName : @thedavecarroll/sample-list-10878
Description : New description for this list.
Uri : https://twitter.com/thedavecarroll/lists/sample-list-10878
Mode : Private
MemberCount : 3
SubscriberCount : 0
UserId : 292670084
UserName : thedavecarroll
Following : True
Remove the user thedavecarroll from the specified list.
Example 2
PS > Remove-TwitterListMember -Id 1397040831777984512 -UserName TwitterDev,TwitterAPI
Confirm
Are you sure you want to perform this action?
Performing the operation "Remove users from list" on target "Id: 1397040831777984512 - UserNames:
TwitterDev,TwitterAPI, Total Users: 2".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): y
Id : 1397040831777984512
CreatedAt : 5/24/2021 11:04:24 PM
Slug : sample-list-10878
Name : Updated-List-Name
FullName : @thedavecarroll/sample-list-10878
Description : New description for this list.
Uri : https://twitter.com/thedavecarroll/lists/sample-list-10878
Mode : Private
MemberCount : 1
SubscriberCount : 0
UserId : 292670084
UserName : thedavecarroll
Following : True
Remove the users TwitterDev and TwitterAPI from the specified list.
Example 3
PS > Get-TwitterList -Id 1397040831777984512 | Remove-TwitterListMember -UserName BluebirdPS
Confirm
Are you sure you want to perform this action?
Performing the operation "Remove users from list" on target "Id: 1397040831777984512, Name: Updated-List-Name -
UserName: BluebirdPS".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): y
Id : 1397040831777984512
CreatedAt : 5/24/2021 11:04:24 PM
Slug : sample-list-10878
Name : Updated-List-Name
FullName : @thedavecarroll/sample-list-10878
Description : New description for this list.
Uri : https://twitter.com/thedavecarroll/lists/sample-list-10878
Mode : Private
MemberCount : 0
SubscriberCount : 0
UserId : 292670084
UserName : thedavecarroll
Following : True
Remove the user BluebirdPS from the specified list.
PARAMETERS
-Id
The id of the list.
Type: String
Parameter Sets: ById
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-List
A list object retrieved from Get-TwitterList.
Type: List
Parameter Sets: ByList
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-UserName
One or more usernames to remove from the list, up to a maximum of 100 per request.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: 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: 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.