As a military member in Maryland, you may think that because you have a right to have weapons in your home, you can use them to defend your property. In many situations, defending your property with these kinds of weapons or even just with your own hands can result in penalties. Service members are at particular risk of this kind of situation backfiring thanks to Article 128 of the Uniform Code of Military Justice.
This code states that you have the right to remove someone from your property but that you cannot use any more force than is necessary to do so. In order to defend yourself, you will have to be able to show that you did not use more force than necessary to remove a trespasser from your property. Otherwise, you can be charged with assault.
Here is an example. If someone were to be on your property and you decided you wanted them to leave, you could ask them to do so. If they refused, you could ask again or attempt to escort them off the premises. If that resulted in an altercation, then you would need to respond only as necessary. So, if the person responds by pushing you, you could potentially push back. Likewise, if the person hits you, it would be reasonable to hit back. It would not, however, be reasonable to shoot them.
This is a situation that can get military members in a troublesome situation, particularly if they draw a weapon on someone who will not leave. This can be seen as a disproportionate response, and that could result in a conviction for assault or other criminal acts.