What did it look like? If it was black and shiny then yes thats what it is. No they are not poisonous and most likely looking for refuge from cooling temperatures or following a food source inside. They will bite and fight. The easisest way to get it out would be to search and find it but carefully. Or bait it with a food prey...which i dont recommend. But if you are not positive as to what kind of snake it is dont attempt anything and call a wildlife expert to remove it.
Rat snakes are not poison but they can bite and it would hurt. You need to get it out or call someone to get it for you.
Thanks! Your answer is awaiting moderation.