We study the two-unit standby system with repair and with preventive maintenance. Preventive maintenance is introduced in order to make the lifetime of the system longer. Using Monte-Carlo method we simulate the work of the two-unit system and we analyze the influence of different types of preventive maintenance on reliability of the system. Monte-Carlo method enables us to find estimates of various parameters relevant to the system for which there exist no explicit formulas in the literature. .