<PAGE>
 
FORM OF POWER OF ATTORNEY                                    EXHIBIT 24.1




     Know all by these presents, that the undersigned hereby constitutes and 
appoints each of Sunil Wadhwani, Ashok Trivedi and Michael J. Zugay, as the
undersigned's true and lawful attorney-in-fact to:


     (1)  execute for and on behalf of the undersigned, in the undersigned's
          capacity as a director and/or officer of Mastech Corporation ("the
          Company"), any and all necessary and/or appropriate forms, agreements
          and schedules to be filed with the Securities and Exchange Commission
          and the NASDAQ Stock Market or any similar authority or regulatory
          body, as the same shall be required pursuant to Section 13 of the
          Securities Exchange Act of 1934, ("the Exchange Act") and the
          corresponding rules thereunder, including without limitation, the
          Company's Annual Report on Form 10-K for the year ended December 31,
          1996; and

     (2)  take any other action of any type whatsoever in connection with the
          foregoing which, in the opinion of such attorney-in-fact, may be of
          benefit to, in the best interest of, or legally required by, the
          undersigned; it being understood that the documents executed by such
          attorney-in-fact on behalf of the undersigned pursuant to this Power
          of Attorney shall be in such form and shall contain such terms and
          conditions as such attorney-in-fact may approve in such attorney-in-
          fact's discretion.
          

     The undersigned hereby grants to each such attorney-in-fact full power and 
authority to do and perform any and every act and thing whatsoever required, 
necessary, or proper to be done in connection with the filing of documents under
Section 13 of the Exchange Act as fully to all intents and purposes as the 
undersigned might or could do if personally present, with full power of 
substitution or revocation, hereby ratifying and confirming all that such 
attorney-in-fact, or such attorney-in-fact's substitute or substitutes, shall 
lawfully do or cause to be done by virtue of this Power of Attorney and the 
rights and powers herein granted.

     This Power of Attorney shall remain in full force and effect until the 
later of such time as the annual meeting of the Company's shareholders is
called to order or June 30, 1997, or unless earlier revoked by the undesigned in
a signed writing delivered to the foregoing attorney-in-fact.

     IN WITNESS WHEREOF, the undersigned has caused this Power of Attorney to be
executed as of this           day of March 1997.
                    ---------


                                                -----------------------------
                                                          Signature



                                                -----------------------------
                                                          Print Name 






                                      40
<PAGE>
 
                                   Signatures
                                   ----------

  Pursuant to the requirements of Section 13 or 15(d) of the Securities Exchange
Act of 1934, the registrant has duly caused this report to be signed on its
behalf by the undersigned, thereunto duly authorized:

                                    Mastech Corporation



            
                                    /s/ Sunil Wadhwani
                                    ------------------
                                    Sunil Wadhwani
                                    Co-Chairman and Chief Executive Officer

Dated March 24, 1997

          Pursuant to the requirements of the Securities Exchange Act of 1934,
this report has been signed below by the registrant and in the capacities and on
the dates indicated.

<TABLE>
<CAPTION>
 
         Signature                          Title                      Date
---------------------------  -----------------------------------  --------------
<S>                          <C>                                  <C>
/S/ Sunil Wadhwani           Co-Chairman, Chief Executive And     March 24, 1997
---------------------------  Director (principal executive
Sunil Wadhwani               officer)
 
 
/S/ Ashok Trivedi            Co-Chairman, President and Director  March 24, 1997
---------------------------
Ashok Trivedi
 
/S/ Michael Zugay            Vice President-Finance and           March 24, 1997
---------------------------  secretary
Michael Zugay                (Principal Financial Officer)
 
/S/ Neil M. Ebner            Corporate Controller                 March 24, 1997
---------------------------  (Principal Accounting Officer)
Neil M. Ebner
 
Ed Yourdon*                  Director                             March 24, 1997

J. Gordon Garrett*           Director                             March 24, 1997

Michel Berty*                Director                             March 24, 1997
</TABLE>


          * The undersigned attorney-in-fact, by signing his name below, does
hereby sign this report on behalf of the above named directors pursuant to the
powers of attorney executed by such persons and filed with the Securities and
Exchange Commission contemporaneously herewith.

                                             /s/ Michael Zugay
                                             -----------------
                                             Michael Zugay
                                             Vice President-Finance
                                             Attorney-in-fact

                                      41