EXHIBIT 23.1
CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM
We hereby consent to the incorporation by reference in this Post-Effective Amendment No. 1 to the
Registration Statement on Form S-8 of our report dated March 15, 2005 relating to the financial
statements, financial statement schedule, managements assessment of the effectiveness of internal
control over financial reporting and the effectiveness of internal control over financial
reporting, of CDW Corporation, which appears in CDW Corporations Annual Report on Form 10-K for
the year ended December 31, 2004.
/s/ PricewaterhouseCoopers LLP
PricewaterhouseCoopers LLP
Chicago, IL
September 2, 2005