When trying to create a Maintenance Plan in SQL Server 2016 you may receive the following error message:

'Agent XPs' component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Agent XPs' by using sp_configure. For more information about enabling 'Agent XPs', see "Surface Area Configuration" in SQL Server Books Online. (Microsoft.SqlServer.Management.MaintenancePlanWizard)

You will also note that at the bottom of the Object Explorer the SQL Server Agent is disabled.

In order to be able to create a Maintenance Plan you must enable the SQL Server Agent. To do this you should run the following script

 

sp_configure 'show advanced options', 1;  

GO  

RECONFIGURE;  

GO  

sp_configure 'Agent XPs', 1;  

GO  

RECONFIGURE  

GO  

 

When executed you will get the following confirmation:

Configuration option 'show advanced options' changed from 0 to 1. Run the RECONFIGURE statement to install.

Configuration option 'Agent XPs' changed from 0 to 1. Run the RECONFIGURE statement to install.

and you can now create Maintenance Plans.