You can mine with it - you can't mine Ethereum because 2GB is too small to store the necessary DAG file in the cards memory.
However, you can mine other Ethash algorithm coins, and you can mine Equihash algorithm cards.
The downside to mining with a GTX 1050 is that it uses a fair amount of electricity for the same hashrate as newer cards. That being said, most of the newer cards are all out of stock, and, if this is just a start to see if you like mining and if you want to build out more, then it's a nice low-cost entry point.
Here's an article that describes detailed specs on the GTX 1050: http://miningcharts.com/questions-and-answers/gtx-1050-hashrate/
Happy mining!