Some more of what Yerusha revealed above...
http://www.israel613.com/geula1.htm
The general mission of Moshiach Ben Yosef is threefold: revelation of the mysteries of Torah, ingathering of the exiles, and removal of the impure spirit from the land.
Ingathering of the exiles encompasses three tasks: building Jerusalem, gathering in the exiles, and fulfilling the commandments dependent upon the Land. All these are alluded to in the following possukim: "Who will ascend the mountain of the Lord? " (Tehillim 24:3), referring to the ingathering of exiles (the head-letters of which — mem-bais-yud — are the initials of ‘Moshiach Ben Yosef’); "Who will stand up in the place of His sanctuary" (Ibid.), referring to building (the head-letters of which — mem-yud-bais — are the initials of ‘Moshiach Ben Yosef’); "He will receive a blessing from the Lord" (Tehillim 24:5), refers to something that carries with it a blessing, such as planting (the head-letters of which — yud-bais-mem — are the initials of ‘Moshiach Ben Yosef’). (Kol HaTor, Chapter 1:6:A)
The approach of the Gaon is summarized by, "Yosef is still alive" (Bereishis 45:26), which means that the Moshiach Ben Yosef is still alive — and will live — because, as it is written, every aspect of the ‘Beginning of the Redemption’ is dependent upon him. Thus the decree regarding his death by Armilus the Wicked will be canceled . . . by extending the period of the exile, through the afflictions that Moshiach Ben Yosef will suffer and the diseases he will bear, and also by deeds that he will accomplish with great devotion, such as gathering in exiles, which is his mission. Messianic difficulties and afflictions connected with Eretz Israel will also help, as well as our regular, daily prayers for the life and success of Moshiach Ben Yosef. Those who occupy themselves with gathering in the exiles lighten the suffering of Moshiach Ben Yosef during the period called ‘Footsteps of the Moshiach.’ The decree regarding the death of Moshiach Ben Yosef will be completed in smaller parts, as in the parable recounted in the Midrash of a king who became angry with his son and swore to throw a big stone at him. Afterwards, he regretted what he had said and had compassion on him. However, in order to fulfill his vow, he broke up the big stone into many smaller ones, and them at his son one at a time. Thus the son was not killed, though he suffered from the small stones. These are the ‘Pangs of the Moshiach’; the suffering will come gradually . . . (Ibid.)
You will arise and show Tzion mercy, for the time to favor her, for the appointed time (moed) will have come. For, Your servants have cherished her stones and favor her dust. (Tehillim 102:-14-15)
The beginning of everything large or small that can be done during the Period of Moshiach is through the ‘me’yudim’ — designated ‘emissaries’ — messengers of Above at the beginning of the redemption. They initiate the ‘ye'udim’ — specific ‘events’ — and the two of them together result in the ‘moadim’ — the appointed ‘times’ — the end-times, the specific times of the different levels during the period of the beginning . . . The Me’yudim initiate the ye’udim which bring closer the moadim, and a proof for this is, "You will arise and show Tzion mercy, for the time to favor her, for the appointed time will have come" (Tehillim 102:14). When, after "your servants have cherished her stones, and favor her dust. Then the nations will fear the Name of G-d, and all the kings of the earth, Your glory. For G-d will have built Tzion, He will have appeared in His glory" (Ibid. 15-17). Then, the redemption will begin, just as in the days of Koresh and the Second Temple, with the permission of the kings of the land, just as our rabbis have said in the Yerushalmi and the Tosfos Yom Tov. . . (Kol HaTor, Chapter 4:3)
A major principle in work involved in the ‘Footsteps of Moshiach’ is that all three central principles, ‘designated deeds,’ ‘times,’ and ‘emissaries,’ must be unified as a "threefold cord that does not tear" (Koheles 4:12). This refers to the deeds, times, and messengers alluded to in the posuk, "The righteous blossoms are seen in the land, the time of your song has arrived, and the voice of the turtledove (kol hator) is heard in the land" (Shir HaShirim 2:12). "The righteous blossoms are seen" refers to the deeds; "the time of your song" refers to the designated times; "the voice of the turtledove" refers to the emissaries. Similarly, in the verse, "For the time to favor her, for the appointed time (moed) will have come. For, Your servants have cherished her stones and favor her dust." (Tehillim 102:-14-15). And, the verse, "There is a time for everything" (Koheles 3:17), means that the time has come according to Israel’s desire at the time of the awakening from below. (Kol HaTor, 4:2)