<PAGE>
 
                                                                    EXHIBIT 24.1

FORM OF POWER OF ATTORNEY


  Know all by these presents, that the undersigned hereby constitutes and
appoints each of Sunil Wadhwani, Ashok Trivedi and Jeffrey McCandless, 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, 1997; 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 on _____________, or unless earlier revoked by the undersigned 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 _______________.


                                                      ________________________
                                                               Signature


                                                      _________________________
                                                               Print Name
<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  13, 1998

  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  13, 1998
---------------------------------------  Director (principal executive officer)
Sunil Wadhwani
 
/s/ Ashok Trivedi                        Co-Chairman, President and Director                  March  13, 1998
---------------------------------------
Ashok Trivedi
 
/s/ Jeffrey McCandless                   Vice President- Finance                              March  13, 1998
---------------------------------------  (principal financial officer)
Jeffrey McCandless
 
/s/ Neil M. Ebner                        Corporate Controller                                 March  13, 1998
---------------------------------------  (principal accounting officer)
Neil M. Ebner
 
Ed Yourdon*                              Director                                             March  13, 1998
J. Gordon Garrett*                       Director                                             March  13, 1998
Michel Berty*                            Director                                             March  13, 1998
</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/ Sunil Wadhwani
                                                    ------------------
                                                    Sunil Wadhwani
                                                    Co-Chairman,
                                                    Chief Executive
                                                    Attorney-in-fact