Share via


gpupdate not recognized as an internal or external, operable program or batch file

Question

Monday, September 2, 2013 2:41 PM

Hi,

My issue is that from command prompt (cmd) when I run the command gpupdate /force on my server 2012 it tells me that the command is not reconized as an internal or external command, operable program or batch file.

I can ping. I can run other commands like gpresult /r...

I have 2 OU and 2 Policies different one for each OU. The client site is a non profit charter high school. 

I don't know what makes the gpupdate command not work but the gpresult command to work.I seen some people say to change the path file but everything in my path is correct.

( this is my PATH variable - 

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\C:\Program Files\Microsoft SQL Server\100\Tools\Binn\C:\Program Files\Microsoft SQL Server\100\DTS\Binn\

end of PATH variable) 

PS. the systemroot is C:\Windows

All replies (4)

Friday, September 6, 2013 10:24 AM ✅Answered

Hi,

With the current situation, would you please check the PATH variable in the Environment Variables again and make sure it’s correct?

There is an article that can help you fix the error “not recognized as an internal or external command” in Windows.

How to fix “not recognized as an internal or external command” in Windows

http://helpdeskgeek.com/how-to/fix-not-recognized-as-an-internal-or-external-command/

If all ok, as a workaround, you can copy gpupdate.exe from a machine that's working OK to c:\windows\system32 and check whether it ran well. If all machines are affected, it may be worth running a virus scan.

In addition, there is a similar question, please refer to.

gpupdate is missing

http://www.edugeek.net/forums/windows/47819-gpupdate-missing.html

Please Note: Since the web sites are not hosted by Microsoft, the links may change without notice. Microsoft does not guarantee the accuracy of this information.

Hope this helps.

Best regards,

Justin Gu


Friday, September 6, 2013 5:26 PM ✅Answered

go to c:\ and do the same search for gpupdate.exe if there occurrences other than the 8 mentioned in the other post rename them to something different like gpupdate.exe.save, and try again running. Maybe you have another one from a non compatible OS like XP floating around.

do the same search but for gpupdate.com just to make sure again if there rename them.


Tuesday, September 3, 2013 1:52 PM

Hi,

Based on your description, I understand you had check the PATH variable in the Environment Variables in your Windows Server 2012. “C:\Windows\system32; C:\Windows; C:\Windows\System32\Wbem;” is really correct. Because, “/force” is a parameters of the Gpupdate command. Would you please go to path: “C:\Windows” and look for some files related with gpupdate. Then check whether the files related with gpupdate are fully exist or not.

By default, there are 8 files related with gpupdate under C:\Windows:

C:\Windows\SysWOW64\en-US\gpupdate.exe.mui

C:\Windows\System32\en-US\ gpupdate.exe.mui

C:\Windows\System32\ gpupdate.exe

C:\Windows\SysWOW64\ gpupdate.exe

C:\Windows\WinSxS\amd64_microsoft-windows-g..policy-cmdlinetools_******\ gpupdate.exe

C:\Windows\WinSxS\x86_microsoft-windows-g..policy-cmdlinetools_******\ gpupdate.exe

C:\Windows\WinSxS\x86_microsoft-windows-g..linetools.resources_******\ gpupdate.exe.mui

C:\Windows\WinSxS\amd64_microsoft-windows-g..linetools.resources_******\ gpupdate.exe.mui

 

In addition, please type command “gpupdate  /?” in cmd.exe and check whether there are some unexpected results? As I mentioned, please also look for the application “gpupdate” in C:\Windows, if you can find it, please run it as an administrator. Please check whether gpupdate ran well or not.

When you can find some more details about this issues in this process, please don’t hesitate to let me know.

Hope this helps.

Best regards,

Justin Gu


Thursday, September 5, 2013 3:03 AM

When I search for the files all 8 files showed up.

When I ran the gpupdate /? in command prompt it still said that the command was not recognized as a internal or external command.

When I ran the gpupdate from the search I ran it said the computer policy was updated successfully then went away. but if I type the command in command prompt it just says that the command was not recognized as a internal or external command.