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

    <schemaVersion>X0508</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2025-05-20</periodOfReport>

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

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001788574</rptOwnerCik>
            <rptOwnerName>Dillow Stacy L</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>1701 E MOSSY OAKS ROAD</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>SPRING</rptOwnerCity>
            <rptOwnerState>TX</rptOwnerState>
            <rptOwnerZipCode>77389</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>1</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle>EVP, Chief People Officer</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>0</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>0</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
    </nonDerivativeTable>

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

    <footnotes>
        <footnote id="F1">Each restricted stock unit represents a contingent right to receive one share of Issuer's common stock.</footnote>
        <footnote id="F2">On 05/20/25, the reporting person was granted 91,704 Restricted Stock Units (&quot;RSUs&quot;), 30,568 of which will vest on each of 05/20/26, 05/20/27, and 05/20/28. Dividend equivalent rights accrue with respect to these RSUs when and as dividends are paid on Issuer's common stock.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>Ki Hoon Kim as Attorney-in-Fact for Stacy L. Dillow</signatureName>
        <signatureDate>2025-05-22</signatureDate>
    </ownerSignature>
</ownershipDocument>
