Some Rules are a little easier to apply to the corporate world than others are. Some can be seen as a good overall approach to life in general, without having to particularly come from the Job Fairy point of view. This is one of those Rules. In a way, it is just as true of your dealings with women as it is with men.
To observe this Rule, you have to listen. Carefully. It is almost like being a horse whisperer. You really do get more mileage out of observing people's behavior than trying to direct it. For one thing, unless you outrank that person, you are not going to be able to command them to perform any particular task. Moreover, this Rule is all about dealing with someone, who at best is a peer. Usually, the dynamic of this relationship is that they have considerably more power than you do. So, what do you do in order to equalize that?
As it states in The Rules, you have to decide what it is you want; what your goals are. You have to decide what your boundaries are, and what you will and will not tolerate. If you are talking about a professional situation, you may have problems dealing with a testosterone-soaked environment such as IT departments tend to be. You may even perceive that the guys are harassing you.
You must decide early on that you are not going to seek their social approval. They will always withhold it from you; that is how they retain power. In fact, that's a way that women open themselves up to harassment - they let a lot of social boundaries get crossed in an effort to "fit in". Well, we here at jobfairy.com do not want you to have to go through that. Therefore, what we recommend is that you always have something to do. You do not complain about the harassment - especially to your boss or to human resources. That takes away your power. However, how you decide to deal with it determines how much power you retain.
Going back to before - you are always quite busy. When the guys are horsing around, you may be in the middle of the pack. That's your signal to look at your watch, say, "My, look at the time", and excuse yourself and deliberately walk off to nowhere, if need be. The bathroom is always a good destination. 99% of your IT department will not be able to follow you in there. You never want to stick around; attempting to crack jokes and fit in. You are not going to, that way.
The only way you can gain social acceptance is for them to bring you in. You have to remain aloof, indifferent, as if none of them matter. You need to keep busy with work and learning everything you can that is necessary for your skill set, and at the very least, the next one after that. They need to invite you. In addition, you do not accept their invitation to go out to lunch with them every time - only about 25 - 30% of the time. Do not make it easy.
You have to decide, honestly, how much of them you have to tolerate. Not want to tolerate, but to calculate the absolute minimum you need to interact with them in order to get your job done. It is a lot less than you would think. Simply make courteous professional requests, and then stay the heck out of the way. Do not push, do not nag, never lose your cool. Always stay in control. The best way to do that is to adopt the mind set that they just do not matter. This gives the power in your dealings with them firmly back to you.