Hello Naveen Kumar Sakthivel,
Thank you for posting on the Microsoft Community Forum.
The error message "exec: "powershell": executable file not found in %PATH%" indicates that the PowerShell executable file is not found in the system's PATH environment variable.
To troubleshoot this issue, you can try the following steps:
- Check if the PowerShell executable file is present in the system's PATH environment variable. You can do this by opening a command prompt and typing "echo %PATH%". If the PowerShell executable file path is not present in the output, you need to add it to the PATH environment variable.
- To add the PowerShell executable file path to the PATH environment variable, open the Control Panel, go to System and Security, and click on System. Click on the "Advanced system settings" link on the left-hand side, then click on the "Environment Variables" button. In the "System variables" section, scroll down and find the "Path" variable, then click on the "Edit" button. Add the path to the PowerShell executable file (usually C:\Windows\System32\WindowsPowerShell\v1.0) to the end of the "Variable value" field, separated by a semicolon (;).
- After adding the PowerShell executable file path to the PATH environment variable, open a new command prompt and try running PowerShell commands again. If the issue persists, you may need to repair or reinstall the PowerShell installation.
Note: If you do not want to reboot the server, you can try restarting the "Windows Explorer" process from the Task Manager. To do this, open the Task Manager, find the "Windows Explorer" process, right-click on it, and select "Restart". This will refresh the system's environment variables without requiring a reboot.
I hope you the information above is helpful.
If you have any questions or concerns, please do not hesitate to let us know.
Best Regards,
Daisy Zhou