Windows Server 2012 R2 - search by file content not working

I can't find any .txt, .php, .cs, .html, etc files using the 'search by file content' option in the searchbar in Windows Server 2012 R2.

I can't find the File Service Role.
I can't find the Windows Search service in Services.
I have checked the advanced option "File content".


Solution 1:

I decided to provide screenshots, as Windows Server features and roles are now in a single interface and it's not obvious where to look.

Step 1. Enable Windows Search Service feature

Step 2. Enable search in contents

Solution 2:

In the explorer menu

View -> Options -> Change Folder And Search Options
Folder Options -> Search -> Check Always Search File names and Contents ....

Solution 3:

findstr /S /L /M /C:"DocumentImportClass" .

search file content into folder and sub folders in windows