NB! It seems this console command is not compatible with CS2.
Command Profile

LISTID

CS:GO

Use this command in your console to print a list of the user IDs that are currently banned from the server you're on.

Syntax
listid

Description

Use this command in your console to print a list of the user IDs that are currently banned from the server you're on.

How To Use listid

  1. Enable the developer console in Counter-Strike settings.
  2. Open the console with the tilde key (~).
  3. Enter listid, replacing bracketed arguments with the value you want, then press Enter.

This legacy command is not currently listed as compatible with Counter-Strike 2.

Syntax And Arguments

listid