When trying to scaffold with asp.net core this command
scaffold-dbcontext \"Data Source=(local);Initial Catalog=MyDb;Integrated Security=True;\" M
Make sure you run VS as Administrator and have installed the following packages: