Alteration of the immune system or of an immune response by agents that activate or suppress its function. This can include immunization or administration of immunomodulatory drugs. immunomodulation can also encompass non-therapeutic alteration of the immune system effected by endogenous or exogenous substances.