When I run below code in command prompt:
C:\xampp\php>php C:\xampp\htdocs\magento2\bin\magento indexer:reindex
it is showing as access denied.
Reindex in magento 2, go to the CLI and then the root folder of your magento installation and run the below command:
php bin/magento indexer:reindex
If you use linux operating system Check your file permission