Skip to content

Set-TwitterBlockedUser

SYNOPSIS

Allows the authenticating user to block or unblock another user.

SYNTAX

Block (Default)

Set-TwitterBlockedUser -User <User> [-Block] [<CommonParameters>]

Unblock

Set-TwitterBlockedUser -Unblock -User <User> [<CommonParameters>]

DESCRIPTION

Allows the authenticating user to block or unblock another user.

EXAMPLES

Example 1

PS > Get-TwitterUser -User BluebirdPS | Set-TwitterBlockedUser -Block
Blocking user 1330877955057344513: True

Block the specified user.

Example 2

PS > Get-TwitterUser -User BluebirdPS | Set-TwitterBlockedUser -Unblock
Blocking user 1330877955057344513: False

Unblock the specified user.

PARAMETERS

-User

The user object, returned by Get-TwitterUser, to be blocked or unblocked.

Type: User
Parameter Sets: UnblockByUser, BlockByUser
Aliases:

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

-Block

Block the specified user.

Type: SwitchParameter
Parameter Sets: BlockByUserId, BlockByUser
Aliases:

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

-Unblock

Unblock the specified user.

Type: SwitchParameter
Parameter Sets: UnblockByUserId, UnblockByUser
Aliases:

Required: True
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

BluebirdPS.APIV2.UserInfo.User

OUTPUTS

System.String

NOTES

Online Version

Get-TwitterBlockedUser

Get-TwitterUser

Api Reference - POST /2/users/:id/blocking

Api Reference - DELETE /2/users/:source_user_id/blocking/:target_user_id