The term is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again.

The title of this post is one of the most common errors you’ll see when using PowerShell.  It’s pretty literal.  It means PowerShell couldn’t find any command with the name you specified.

I’ve found that it’s very common to hit this error for two specific occasions.

1.  You mistyped the command you meant to run.

2.  You tried to run a command in the current directory but forgot to prepend it with .\

This second reason is a lot more common for beginners, especially if they are used to cmd.exe.   cmd.exe will search the current directory for commands, but PowerShell won’t unless it happens to be in the PATH environment variable.  This helps to prevent trojan attacks.  If you want to run a command in a directory not in your PATH you have to specify the directory.  For the current directory, a quick solution is to prepend your command with .\  For example, rather than running script.ps1,  run .\script.ps1

(A few more words about this subject here.)

About these ads

44 Responses to “The term is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again.”

  1. Powershell: Cannot run EXE. The term is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again. « Bite The Wax Tadpole Says:

    [...] In the same way that you must prepend a powershell script with . e.g. .ripper.ps1, you must also prepend exe’s with . if the directory containing the exe is not in your PATH statement. [...]

  2. Sean Says:

    Thanks the “.\” part did it. Why can’t Microsoft program the ability for the program to simple state that that is needed when you just type in a file name?

  3. Idiot Says:

    Or if you are a really clueless n00b like me, you may be trying to run Exchange commands in a Powershell Window – Change it to the Exchange Management Shell. Oops!

  4. PowerShell: the 2 most common error messages for starters « The Wiert Corner – irregular stream of Wiert stuff Says:

    [...] message by mosoto (Marcel J. Ortiz Soto) answered this as one of the first in the search results for “is not [...]

  5. Workflow 4.0 « Dead Code Says:

    [...] 4.http://mosoto.wordpress.com/2008/09/20/the-term-is-not-recognized-as-a-cmdlet-function-operable-prog… [...]

  6. tory burch sale outlet Says:

    so great post for me, thank you very much

  7. windows Says:

    find software…

    The term is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again. « mosoto’s Weblog…

  8. Brad Says:

    F#&K, command line language! This is 2010. Where’s the button in an interface that runs the scripts. I have more important things to do than type.

  9. Phil Says:

    Well Brad, try reading about it first then you might learn why it is this way.

  10. Steam Key kaufen Says:

    Steam Key kaufen…

    [...]The term is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again. « mosoto’s Weblog[...]…

  11. satellite TV Says:

    satellite TV…

    [...]The term is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again. « mosoto’s Weblog[...]…

  12. scriptmafia Says:

    scriptmafia…

    [...]The term is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again. « mosoto’s Weblog[...]…

  13. msbuzzz Says:

    Hi Mosoto Thanks, for the info, however, could you please help me to get this done. I am getting same error for the following –

    PS C:\> Restore-SPSite -Identity http://sok1834:60000/ -Path “D:/Sibin/MS Solution/MS_Site_Backup/MS.bak”

    The term ‘Restore-SPSite’ 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.

    Thanks !!

    • mosoto Says:

      Hi msbuzzz, From my web search I found that Restore-SPSite is a sharepoint cmdlet. The most likely cause for your problem is not having the Sharepoint snapin loaded. The easiest solution is to try running the command in the sharepoint management shell. See

      http://technet.microsoft.com/en-us/library/ee806878.aspx

      Alternatively, you can load the snapin in the default PowerShell Window using hte add-pssnapin cmdlet. “Add-PSSnapin Microsoft.SharePoint.PowerShell”

      You can see all the registered snapins by running “Get-PSSnapin -Registered”. Get-PSSnapin with no parameters will show you those snapins that are already loaded.

  14. The term is not recognized as the name of a cmdlet « mosoto’s Weblog Says:

    [...] long time ago I wrote a blog post about what I recognized as a very common error when starting to use PowerShell.  You might have [...]

  15. Microsoft Outlook 2010 key Says:

    Microsoft Outlook 2010 key…

    [...]The term is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again. « mosoto’s Weblog[...]…

  16. greyzeeeeeeeee Says:

    im getting this error… in visual studio 2010 package management console..
    im in a hurry.. will anyone please help……………….. PLEASE

    PM> Scaffold Controller post -Repository
    The term ‘Scaffold’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check th
    e spelling of the name, or if a path was included, verify that the path is correct and try again.
    At line:1 char:9
    + Scaffold <<<< Controller post -Repository
    + CategoryInfo : ObjectNotFound: (Scaffold:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

  17. Free website directory, Web directory. Add your website into free web directory and improve your search engine ranking and search engine position. Says:

    Free website directory, Web directory. Add your website into free web directory and improve your search engine ranking and search engine position….

    [...]The term is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again. « mosoto’s Weblog[...]…

  18. Bob Says:

    Thanks Im just starting to lern python. Couldnt get it to run unless I was in the Python install directory. So I googled part of the error term. saw this result up top, and foun that the .\ was what I forgot.

  19. Gravedigger Says:

    thanks man, good and clear post

  20. http://conselho.org/groups/essential-details-of-barcelona-an-a-z/ Says:

    It’s remarkable to go to see this website and reading the views of all friends on the topic of this piece of writing, while I am also keen of getting familiarity.

  21. Workflow 4.0 | Chika Blog Says:

    [...] 4.http://mosoto.wordpress.com/2008/09/20/the-term-is-not-recognized-as-a-cmdlet-function-operable-prog… [...]

  22. car hire paphos hotel delivery Says:

    This super paphos car hire service helps you to reach the venue, we are the only company that can meet your
    needs. Not that there weren’t any concept of shuttle cabs. With a twinkle in the eye of anyone who loves cars becauseit is the definition of automotive perfection.

  23. ebay misspelled Says:

    I’m gone to convey my little brother, that he should also pay a visit this blog on regular basis to obtain updated from newest gossip.

  24. anthony Says:

    import-module activedirectory

  25. behindertenlift Says:

    When I originally commented I clicked the “Notify me when new comments are added” checkbox and now each time a comment is added I get three emails with the
    same comment. Is there any way you can remove
    me from that service? Many thanks!

  26. http://top.b2bnet.at/ Says:

    I do not know whether it’s just me or if everyone else encountering problems with your blog. It seems like some of the written text within your posts are running off the screen. Can someone else please provide feedback and let me know if this is happening to them as well? This may be a issue with my browser because I’ve had this happen previously.

    Many thanks

  27. weblink Says:

    And then their rehearsal ignited the studio. According to company executives, more
    than two dozen experimental therapies have been studied for so-called” female Farmacia On Line” may be on the market!
    One doctors’ group, the National Guestworker Alliance, said Wednesday that it was not trying to encourage science-based industries in the UK last year. DisplayBy now you should know that this isn’t just something middle aged men are sometimes in need of oral pills,
    along with built-in WiFi. Acrobat nine – Clear Scan: Document storage dimension 127 KB.

  28. Mia Eleanor Says:

    I’m not that much of a online reader to be honest but your blogs really nice; keep it up… I’ll go ahead and bookmark your site to come back in the future. Cheers Irvine Roofing Contractors, 18242 McDurmott W., #G-2, Irvine, CA, 92614, US, 949-390-9929

  29. Maximilian Says:

    This article will help the internet people for building
    up new weblog or even a blog from start to end.

  30. Noemi Says:

    Hi there, i read your blog occasionally and i own
    a similar one and i was just wondering if you get a lot of spam responses?
    If so how do you stop it, any plugin or anything
    you can suggest? I get so much lately it’s driving me insane so any help is very much appreciated.

  31. website seo Says:

    A person essentially assist to make significantly posts I’d state. That is the first time I frequented your website page and so far? I surprised with the analysis you made to make this particular put up extraordinary. Wonderful process!

  32. video Says:

    Playing Video 6 Behind Callahan’s games helps in the development of an addiction. If your content is by working with others.

  33. Bruzote Says:

    Even prepending the dot-slash is not working for me (.\)! :-(

  34. visa vietnam Says:

    all the time i used to read smaller content that also clear their
    motive, and that is also happening with this post which
    I am reading at this time.

  35. Jeanette Says:

    “The term is not recognized as a cmdlet, function,
    operable program, or script file. Verify the term and try again.
    | mosoto’s Weblog” in reality got myself simply addicted on ur
    web-site! I personallywill probably be returning much more regularly.
    Thank you -Winnie

  36. Johnk250 Says:

    Hey I am so excited I found your website, I really found you geaebddfdkea

  37. Cynthia Says:

    Hi, i think that i saw you visited my site so i came to “return the favor”.I’m attempting to find
    things to improve my site!I suppose its ok to use a few of your ideas!!

  38. Thanksgiving download mobi Says:

    Hi this is somewhat of off topic but I was wanting to know if blogs use
    WYSIWYG editors or if you have to manually code with HTML.
    I’m starting a blog soon but have no coding expertise so I wanted to get advice from someone with experience.
    Any help would be enormously appreciated!

  39. Three Sisters Around the Greek Table: A Cookbook pdf Says:

    Fantastic site you have here but I was wondering if
    you knew of any forums that cover the same topics discussed here?
    I’d really love to be a part of group where I can get comments from other
    experienced individuals that share the same interest. If you have any suggestions, please let me know.
    Thank you!

  40. PHONICS PRACTICE READERS SERIES B SET 1, 10 READERS AND TEACHER GUIDE download pdf Says:

    I loved as much as you’ll receive carried out right here.
    The sketch is attractive, your authored subject matter stylish.
    nonetheless, you command get bought an shakiness over that
    you wish be delivering the following. unwell unquestionably come further
    formerly again as exactly the same nearly a lot often inside case you shield this increase.

  41. V pourVendetta pdf Says:

    What’s up, I want to subscribe for this blog to
    obtain most up-to-date updates, therefore where can i do it please assist.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: