
Hi @Mohammad Tahir , thank you for posting in the Q&A forum.
You can refer to the document here (previous Microsoft KB) for how to upgrade a server operating system that has SharePoint Server 2013 or 2010 installed.
Microsoft does not recommend performing an in-place upgrade of Windows Server.
For the SharePoint servers, create new servers with Windows Server 2012 R2, deploy SharePoint, configure it appropriately, rotate it into the farm, and then retire your older SharePoint servers.
For SQL Server, also build a new server, migrate the databases + SQL logins and retire the old SQL Server.
*Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link. *
If an Answer is helpful, please click "Accept Answer" and upvote it.
**Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. **