Windows server : PowerShell – Error : appcmd.exe : The term ‘appcmd.exe’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

fig : Windows PowerShell - appcmd utility - to take the backup of IIS
fig : Windows PowerShell - appcmd utility - to take the backup of IIS

Hi All,

Greetings for the day!!! LIFE IS BEAUTIIFUL 🙂

Today new issue and solution.

Background:

  • For one of our SharePoint server project I am looking for the option to take the backup of IIS
  • We have SharePoint 2019 installed on Microsoft Windows Server 2019 Standard
  • One of the option I found is – appcmd utility
  • appcmd utility resides in “%WINDIR%/Systme32/inetsrv” folder
  • When I navigate to folder and check this utility is available in folder
  • But when I try to execute the command gets an error
fig : Windows PowerShell - appcmd utility - to take the backup
fig : Windows PowerShell – appcmd utility – to take the backup of IIS

ISSUE / ERROR

When I try to execute the utility to backup IIS I am getting an error

PS C:\Windows\System32\inetsrv> appcmd.exe
appcmd.exe : The term ‘appcmd.exe’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included,
verify that the path is correct and try again.
At line:1 char:1

  • appcmd.exe
  • ~~
    • CategoryInfo : ObjectNotFound: (appcmd.exe:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException
fig : Windows PowerShell - appcmd utility - to take the backup of IIS
fig : Windows PowerShell – appcmd utility – to take the backup of IIS

Solution

  • When we executed utility bit different way as in below code line, it worked like charm
PS C:\Windows\System32\inetsrv> .\appcmd.exe

fig : Windows PowerShell - appcmd utility - to take the backup of IIS
fig : Windows PowerShell – appcmd utility – to take the backup of IIS

Reason

  • By default, Windows PowerShell does not load commands from current location
  • We need to type commands like .\appcmd.exe
  • To run a script that is in the current directory, specify the full path, or type a dot .\ to represent the current directory.

Thanks for reading the article !! Please feel free to discuss in case any issues / suggestions / thoughts / questions !

HAVE A GREAT TIME AHEAD !!! LIFE IS BEAUTIFUL 🙂

Prasham Sabadra

LIFE IS VERY BEAUTIFUL :) ENJOY THE WHOLE JOURNEY :) Founder of Knowledge Junction and live-beautiful-life.com, Author, Learner, Passionate Techie, avid reader. Certified Professional Workshop Facilitator / Public Speaker. Scrum Foundation Professional certificated. Motivational, Behavioral , Technical speaker. Speaks in various events including SharePoint Saturdays, Boot camps, Collages / Schools, local chapter. Can reach me for Microsoft 365, Azure, DevOps, SharePoint, Teams, Power Platform, JavaScript.

You may also like...

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: