Pastrami is good for up to 5 days in the refrigerator.
You can safely leave Pastrami meat out at room temperature for up to 2 hours and if it's been past 2 hours since you've left the Pastrami out then it's best to throw it out because of the bacteria that grows on the Pastrami meat at a fast rate when left out at room temperature.
If you're not gonna serve or eat the Pastrami within 2 hours then be sure to refrigerate it to keep bacteria from growing on the meat.
If you want to keep Pastrami longer than 5 days you can and should freeze it and when frozen the frozen Pastrami meat will last for a year or more.
However it's best to eat the Pastrami within 6 months for the best taste and quality.