How does Vitamin D boost the immune system?

Vitamin D enhances immune function in its response to both bacterial and viral agents, primarily through promoting differentiation and activity of macrophages. Which means, that the immune response can be tailored through the appropriate cell response. (Braun&Cohen)