Right click portal 2 in your steam library and select properties there should be a button that says Set launch options
some commands are
-windowed - (I like to use -sw)
-console - starts the game with dev console enabled
-autoconfig - sets setting for the detected hardware on your computer