Blocking Microsofts Telemtry

This may not have been overly clear from my previous answer:
Yes, files have to comply to HOSTS format, i.e. each line must either match <ip.ad.dr.es> <domain.name> or just <domain.name>.
In either case, Pi-hole will use solely the domain name for filtering.

Have a look at this post for additional hints on rolling your own blocklist: