Hi and welcome to Just Answer!If you physically work in different states - you will need to account separately for wages paid to you for services provided in each state.
Whether you need to register your S-corporation as a foreign entity - depends on the law of that specific state. Most states do require a foreign (out of state) entity to be registered.In additional - you need to consider your home state. Thus - your wages are taxable in Montana.
So will I need to do the Foreign Entity thing here in Montana if I am doing most of my work from home?