• —- To enable the feature.

    EXEC sp_configure ‘xp_cmdshell’, 1

    GO

    —- To update the currently configured value for this feature.

    RECONFIGURE

    GO

    Check if this works for you.