Microsoft Corp. said Friday its computers were hit by cyberattacks similar to those recently reported by Facebook Inc. and Apple Inc.

In a blog post, a Microsoft security official said the company found a "small number of computers," including some in its Mac business unit, were infected with malicious software. Microsoft said there's no evidence its customer data was affected. The Microsoft investigation is ongoing, according to the post by Matt Thomlinson, general manager at Microsoft's trustworthy computing security...