How do you make the AI throw smokegrenade?

First make sure the unit has smokegrenades in his inventory. (a team leader for example) Put this line of code in the initialization field, waypoint, trigger or script.

unitname fire "SmokeshellMuzzle"