Joining The Bandit Faction:

Solution 1:

From doing a quick google search, it appears that the command is built up from three parts:

player.addfaction <factionID> <True|False>

So for example, joining the Bandit faction would look like:

player.addfaction E0CD9 1

If you ever wanted to leave a faction, the 1 at the end would likely change to either a 0 or a 2[citation needed]

You can see a full list of all the faction IDs here