How do I hook a portable gas powered generator up to an apartment so that I have electricity?
I am trying to hook up a generator to an apartments electrical to be able to turn te apartment for the apartment complex I work for so I need to know how to do it so I can see and make sure everything electrical works.

You need to use a transfer switch. This disconnects you from the grid while the generator is running so the power company workers don’t get shocked from your power source. There are automatic and manual transfer switches. An automatic switch is usually used with a permananently installed generator. The generator starts by itself when the power goes out and the switch keeps the utility workers safe. When the power comes back on it shuts itself off. Manual switches are more commonly used with portable generators. You flip the switch, then plug in and start the generator. When the power returns you do the reverse. If your generator is not big enough to power the whole house you will need an electrician to wire it to the circuits you need most.
If your dealing with an apartment complex, you dealing with some pretty heavy electricity/ cable.
Not knowing how many amps & wire size comming into your complex is the problem.
I hope you aren’t thinking of tackling this on your own.
But, here’s a general discription on what to expect or done.
After the "Main" (wiring) comes into the apartment complex it is separated (run) to each apartment meter, after the meter it goes to each circuit breaker box. In each circuit box it’s devided into separate circuits (such as range, receptacles,washer / dryer, etc. with a circuit breaker protecting each item or area.
What has to be done is to install a "selector switch" between the meter and the circuit breaker box.
This selector switch has to be capable of sensing which set of wires the electricity is comming from, so it automatically switches to those wires.
Not knowing what the wire size is that services each apartment, I can’t tell you what size Selector switch to use.
Once the power comes back on, the selector switch automatically switches to that source.
You’re going to need an electrician to hook this all up, because you’re dealing with some pretty high stuff.
When the wiring is split after it comes from the meter, the meter has to "pulled" before you can cut into that main lead (to each apartment).
In my area, there’s a thin wire that is connected to the meter & the meter base. If I pull the meter, the wire has to be cut. If the utilities come to check my meter & see that wire cut,they’ll know I was messing with the meter. I don’t want to know what they’ll do, but I’ll bet it won’t be nice.
What you want to do is feesible (sp) , but it may cost a bunch depending on how many units you want to do this to.
Sorry, but if you do not know how to do this, you are not qualified to be doing the work. Apartments and other "public" areas require a licensed electrician to do this type work.
call a qualified professional electrical contractor. If you do this wrong you could kill several people who are working on the sytem several miles away from you. This should only be done by qualified professional electricians which you are not or you would not be asking here. Call a qualified professional electrician to do the work.