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 Microsoft 365 Junction, Speaker, Author, Learner, Developer, Passionate Techie. Certified Professional Workshop Facilitator / Public Speaker. Believe in knowledge sharing. Around 20+ years of total IT experience and 17+ years of experience in SharePoint and Microsoft 365 services Please feel free me to contact for any SharePoint / Microsoft 365 queries. I am also very much interested in behavioral (life changing) sessions like motivational speeches, Success, Goal Setting, About Life, How to live Life etc. My book - Microsoft 365 Power Shell hand book for Administrators and Beginners and 100 Power Shell Interview Questions - https://www.amazon.in/Microsoft-Administrators-Beginners-Interview-Questions/dp/9394901639/ref=tmm_pap_swatch_0?_encoding=UTF8&qid=1679029081&sr=8-11

You may also like...

Leave a Reply

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

Discover more from Microsoft 365

Subscribe now to keep reading and get access to the full archive.

Continue reading