Same as K1, really - open swkotor2.ini and add the line 'EnableCheats=1' under 'Game Options'. Save (obviously), then when in-game press the ` button.
Not that in this one the cheats console is invisible. You will, however, know that it is active as the keys will not activate shortcuts until you press 'Enter' and close the console again.
If on Vista, it may be a little different - you'll need to check for anything in any 'Compatibility Files' folder - there may be a swkotor2.ini in there. If yes, it needs changed in the same way, but make sure it is done with Administrator privileges.
If you are still stuck: