Investors & landlords

For tax purposes, yes, you can do that on your H1B visa.  However, you should check if that is allowed for your visa.

If services are not provided (such as maid service, meals, concierge services) it is passive income, and the rental is reported in the rental section and is shown on Schedule E of your tax return.