Hp z240 i7

Solution
Well, you would need to get a Low Profile card like this MSI one: https://www.amazon.com/MSI-GTX-1050-TI-4GT/dp/B01N2W8MJ9

However, your system has a 240w power supply in it. Nvidia's official recommendations for a 1050 Ti(or even a regular 1050) is a 300w power supply.
So, there's a chance it may not work.
You might have to buy a standard ATX power supply and keep the side panel off w/ the PSU sitting somewhere outside of the case.
Well, you would need to get a Low Profile card like this MSI one: https://www.amazon.com/MSI-GTX-1050-TI-4GT/dp/B01N2W8MJ9

However, your system has a 240w power supply in it. Nvidia's official recommendations for a 1050 Ti(or even a regular 1050) is a 300w power supply.
So, there's a chance it may not work.
You might have to buy a standard ATX power supply and keep the side panel off w/ the PSU sitting somewhere outside of the case.
 
Solution