Exhibit 10.4

PC Connection, Inc.

Restricted Stock Agreement

The terms and conditions of the award of shares of restricted common stock of the Company (the Restricted Shares) made to the Recipient, as
set forth on the cover page of this Agreement, are as follows:

1. Issuance of Restricted Shares.

(a) The Restricted Shares are issued to the Recipient, effective as of the Grant Date (as set forth on the cover page of this Agreement),
in consideration of employment services rendered and to be rendered by the Recipient to the Company.

(b) As promptly as
practicable following the Grant Date, the Company shall issue one or more certificates in the name of the Recipient for the Restricted Shares. Such certificate(s) shall initially be held on behalf of the Recipient by the Secretary of the Company.
Following the vesting of any Restricted Shares pursuant to Section 2 below, the Secretary shall, if requested by the Recipient, deliver to the Recipient a certificate representing the vested Restricted Shares. The Recipient agrees that the
Restricted Shares shall be subject to the forfeiture provisions set forth in Section 3 of this Agreement and the restrictions on transfer set forth in Section 4 of this Agreement.

2. Vesting Schedule. Unless otherwise provided in this Agreement or the Plan, the Restricted Shares shall vest in accordance with the vesting
schedule set forth on Schedule A attached hereto. Any fractional number of Restricted Shares resulting from the application of the foregoing percentages shall be rounded down to the nearest whole number of Restricted Shares.

3. Forfeiture of Unvested Restricted Shares Upon Employment Termination.

In the event that the Recipient ceases to be employed by the Company for any reason or no reason, with or without cause all of the Restricted Shares that
are unvested as of the time of such employment termination shall be forfeited immediately and automatically to the Company, without the payment of any consideration to the Recipient, effective as of such termination of employment: The
Recipient hereby authorizes the Company to take any actions necessary or appropriate to cancel any certificate(s) representing forfeited Restricted Shares and transfer ownership of such forfeited Restricted Shares to the Company; and if the Company
or its transfer agent requires an executed stock power or similar confirmatory instrument in connection with such cancellation and transfer, the Recipient shall promptly execute and deliver the same to the Company. The Recipient shall have no
further rights with respect to any Restricted Shares that are so forfeited. If the Recipient is employed by a subsidiary of the Company, any references in this Agreement to employment with the Company shall instead be deemed to refer to employment
with such subsidiary.



---

4. Restrictions on Transfer.

The Recipient shall not sell, assign, transfer, pledge, hypothecate or otherwise dispose of, by operation of law or otherwise (collectively
transfer) any Restricted Shares, or any interest therein, until such Restricted Shares have vested, except that the Recipient may transfer such Restricted Shares: (a) to or for the benefit of any spouse, children, parents, uncles,
aunts, siblings, grandchildren and any other relatives approved by the Compensation Committee (collectively, Approved Relatives) or to a trust established solely for the benefit of the Recipient and/or Approved Relatives, provided
that such Restricted Shares shall remain subject to this Agreement (including without limitation the forfeiture provisions set forth in Section 3 and the restrictions on transfer set forth in this Section 4) and such permitted transferee
shall, as a condition to such transfer, deliver to the Company a written instrument confirming that such transferee shall be bound by all of the terms and conditions of this Agreement; or (b) as part of the sale of all or substantially all of
the shares of capital stock of the Company (including pursuant to a merger or consolidation); provided that the securities or other property received by the Participant in connection with such transaction shall remain subject to this Agreement. The
Company shall not be required (i) to transfer on its books any of the Restricted Shares which have been transferred in violation of any of the provisions of this Agreement or (ii) to treat as owner of such Restricted Shares or to pay
dividends to any transferee to whom such Restricted Shares have been transferred in violation of any of the provisions of this Agreement.

5. Restrictive Legends.

All certificates representing Restricted Shares shall have affixed thereto a legend in
substantially the following form, in addition to any other legends that may be required under applicable law:

These shares of stock
are subject to forfeiture provisions and restrictions on transfer set forth in a certain Restricted Stock Agreement between the corporation and the registered owner of these shares (or his or her predecessor in interest), and such Agreement is
available for inspection without charge at the office of the Secretary of the corporation.

6. Rights as a Shareholder.

Except as otherwise provided in this Agreement, for so long as the Recipient is the registered owner of the Restricted Shares, the
Recipient shall have all rights as a shareholder with respect to the Restricted Shares, whether vested or unvested, including, without limitation, any rights to receive dividends and distributions with respect to the Restricted Shares and to vote
the Restricted Shares and act in respect of the Restricted Shares at any meeting of shareholders. If any such dividends or distributions are paid in shares, or consist of a dividend or distribution to holders of common stock other than a ordinary
cash dividend, the shares, cash or other property will be subject to the same restrictions on transferability and forfeitability as the Restricted Shares with respect to which they were paid.

7. Provisions of the Plan.

This
Agreement is subject to the provisions of the Plan, a copy of which is furnished to the Recipient with this Agreement.



---

8. Tax Matters.

(a) Acknowledgments; Section 83(b) Election. The Recipient acknowledges that he or she is responsible obtaining the advice of
the Recipients own tax advisors with respect to the acquisition of the Restricted Shares and the Recipient is relying solely on such advisors and not on any statements or representations of the Company or any of its agents with respect to the
tax consequences relating to the Restricted Shares. The Recipient understands that the Recipient (and not the Company) shall be responsible for the Recipients tax liability that may arise in connection with the acquisition, vesting and/or
disposition of the Restricted Shares. The Recipient acknowledges that he or she has been informed of the availability of making an election under Section 83(b) of the Internal Revenue Code, as amended, with respect to the issuance of the
Restricted Shares and that the Recipient has decided not to file a Section 83(b) election.

(b) Withholding. The
Recipient acknowledges and agrees that the Company has the right to deduct from payments of any kind otherwise due to the Recipient any federal, state, local or other taxes of any kind required by law to be withheld with respect to the vesting of
the Restricted Shares. On each date on which Restricted Shares vest, the Company shall deliver written notice to the Recipient of the amount of withholding taxes due, if any, with respect to the vesting of the Restricted Shares that vest on such
date; provided, however, that the total tax withholding cannot exceed the Companys minimum statutory withholding obligations (based on minimum statutory withholding rates for federal and state tax purposes, including payroll taxes, that are
applicable to such supplemental taxable income).

9. Miscellaneous.

(a) No Right to Continued Employment. The Recipient acknowledges and agrees that, notwithstanding the fact of the vesting of the
Restricted Shares is contingent upon his or her continued employment by the Company this Agreement does not constitute an express or implied promise of continued employment or confer upon the Recipient any rights with respect to continued employment
by the Company.

(b) Governing Law. This Agreement shall be construed, interpreted and enforced in accordance with
the internal laws of the State Delaware without regard to any applicable conflicts of laws provisions.

(c)
Recipients Acknowledgments. The Recipient acknowledges that he or she has read this Agreement, has received and read the Plan, and understands the terms and conditions of this Agreement and the Plan.



---

PC Connection, Inc.

Restricted Stock Agreement



|                                                     |  |  |  | 
|---------------------------------------------------- |  |  |  | 
|Name of Recipient:                                   |  |  |  | 
|                                                     |  | 
|Number of shares of restricted common stock awarded: |  |  |  | 
|                                                     |  | 
|Grant Date:                                          |  |  |  | 

PC Connection, Inc. (the Company) has selected you to receive the restricted stock
award described above, which is subject to the provisions of the Companys 2007 Amended and Restated Stock Incentive Plan (the Plan) and the terms and conditions contained in this Restricted Stock Agreement. Please confirm your
acceptance of this restricted stock award and of the terms and conditions of this Agreement by signing a copy of this Agreement where indicated below.



PC Connection, Inc.By:[insert name and title]




|                          
|--------------------------
|Accepted and Agreed:      
|                          
|                          
|[insert name of recipient]



---

Schedule A