I have BF2 but have not played online in quite some time.  I performed the following to get my BF2 GUID: 
  
# Enter a BF2 Server that is using Punk Buster. 
  
# Hit the (`~) key to bring up the console. 
  
# Type in pb_myguid 
  
# Copy down the result. This will be letters AND numbers.  
  
Hope that helps. 
  
* Edit * 
  
Additionally, you can place the attached file (pbcl.cfg) in your pb folder which will enable Punkbuster client logging.  When you join a server, it will capture your GUID (when you enter the pb_myguid command).  If using Windows XP the game install path is probably C:\Program Files\EA GAMES\Battlefield 2\pb. 
  
pbcl.cfg