Help, Your PowerShell Command Isn't Working!
By: Cam Wohlfeil
Published: 2018-02-06 0000 EST
Modified: 2018-02-06 0000 EST
Category: Programming
Tags:
powershell
This is a living document where I try to help common issues running the PowerShell commands and scripts I post.
The term <cmdlet> is not recognized as the name of a cmdlet... etc.
This can be caused by two issues, either you have not imported the appropriate module (i.e. you did not load the Exchange, IIS, SQL, PowerCLI, etc cmdlets) or you are using an out of date version of PowerShell/OS. For the former issue you can just import the correct module like so:
Import-Module <Module Name>
Or, if it happens to be a snap-in instead of a module:
Add-PSSnapin <Snapin Name>
For the latter issue, I only usually test my commands on Windows 10/Server 2016 with the latest Windows Management Framework (WMF). If you are on an older OS you really need to get on Windows 10 for security and stability reasons alone. If that really is not an option, get the latest version of the WMF here.
References: