<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0508</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2025-05-02</periodOfReport>

    <issuer>
        <issuerCik>0001645590</issuerCik>
        <issuerName>Hewlett Packard Enterprise Co</issuerName>
        <issuerTradingSymbol>HPE</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001023219</rptOwnerCik>
            <rptOwnerName>RUSSO PATRICIA F</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>C/O HEWLETT PACKARD ENTERPRISE COMPANY</rptOwnerStreet1>
            <rptOwnerStreet2>1701 E MOSSY OAKS ROAD</rptOwnerStreet2>
            <rptOwnerCity>SPRING</rptOwnerCity>
            <rptOwnerState>TX</rptOwnerState>
            <rptOwnerZipCode>77389</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>1</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>0</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>15318</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>337971.4619</value>
                    <footnoteId id="F1"/>
                    <footnoteId id="F2"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>By Merrill Lynch</value>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
    </nonDerivativeTable>

    <derivativeTable>
        <derivativeTransaction>
            <securityTitle>
                <value>Restricted Stock Units</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <footnoteId id="F3"/>
            </conversionOrExercisePrice>
            <transactionDate>
                <value>2025-05-02</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>14235</value>
                    <footnoteId id="F4"/>
                </transactionShares>
                <transactionPricePerShare>
                    <footnoteId id="F4"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <exerciseDate>
                <footnoteId id="F4"/>
            </exerciseDate>
            <expirationDate>
                <footnoteId id="F4"/>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>14235</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>14235</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeTransaction>
    </derivativeTable>

    <footnotes>
        <footnote id="F1">The reporting person elected to defer the receipt of common stock until the termination of her service as a member of the Issuer's Board of Directors.</footnote>
        <footnote id="F2">The number of shares in column 5 includes 2,461.9376 vested restricted stock unit (&quot;RSU&quot;) dividend equivalent rights at $15.14 per RSU credited to the reporting person's account on 04/18/25.</footnote>
        <footnote id="F3">Each restricted stock unit represents a contingent right to receive one share of Issuer's common stock.</footnote>
        <footnote id="F4">On 05/02/25, the reporting person was granted 14,235 restricted stock units (&quot;RSUs&quot;), all of which will cliff vest on the earlier of 05/02/26 or the date of Issuer's 2026 Annual Stockholders Meeting. Dividend equivalent rights accrue with respect to these RSUs when and as dividends are paid on Issuer's common stock. The reporting person elected to defer the receipt of common stock until the termination of her service as a member of the Issuer's Board of Directors.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>Ki Hoon Kim as Attorney-in-Fact for Patricia F. Russo</signatureName>
        <signatureDate>2025-05-06</signatureDate>
    </ownerSignature>
</ownershipDocument>
