PowerShell not recognized as cmdlet: Fix Common Name Errors

The error “is not recognized as the name of a cmdlet, function, script file, or operable program” is the most-Googled PowerShell error message, and it has at least five distinct root causes. Fixing it without understanding why it appears leads to trial and error. This guide systematically eliminates every cause of the PowerShell is not recognized as a cmdlet error so you identify and resolve it in under two minutes.
Cause 1: Typo in Command Name
The most common cause is a misspelled cmdlet name. PowerShell command names are Verb-Noun format and do not have abbreviations — the full name is required. Use Get-Command with a wildcard to find the correct spelling:
# Error: the misspelled command
Get-Processes # Error — should be Get-Process
GetProcess # Error — missing hyphen
get process # Error — space, not a valid cmdlet name
# Find the correct spelling
Get-Command -Name "*process*"
Get-Command -Verb Get -Noun Process
CommandType Name Version Source
----------- ---- ------- ------
Cmdlet Get-Process 7.0.0.0 Microsoft.PowerShell.Management
Cause 2: Module Not Imported
Cmdlets provided by modules are not available until the module is imported. If you call Get-ADUser without importing ActiveDirectory, PowerShell cannot find it:
# Error: module not loaded
Get-ADUser -Filter * # "not recognized" if ActiveDirectory module not imported
# Check if module is available on the system
Get-Module -ListAvailable -Name "ActiveDirectory"
# Import and retry
Import-Module ActiveDirectory -ErrorAction Stop
Get-ADUser -Filter *
# For auto-loading, verify PSModulePath includes the module's directory
$env:PSModulePath -split ';'
Cause 3: Running in CMD Not PowerShell
PowerShell cmdlets are not available in the Windows Command Prompt (cmd.exe). If you run PowerShell commands in a CMD window, every cmdlet shows as unrecognized:
# Check which shell you are in — run this command
$PSVersionTable
# If that returns "not recognized", you are in CMD, not PowerShell
# Look at the prompt and title bar:
# CMD: C:\Users\admin>
# PowerShell: PS C:\Users\admin>
# Launch PowerShell from CMD
powershell.exe
# Or PowerShell 7:
pwsh.exe
Name Value
---- -----
PSVersion 7.4.0
PSEdition Core
Cause 4: Old PowerShell Version
Some cmdlets were introduced in specific PowerShell versions. ForEach-Object -Parallel requires PS 7.0, Get-NetTCPConnection requires PS 4.0, and many newer cmdlets simply do not exist in PS 2.0 or 3.0:
# Check your PowerShell version
$PSVersionTable.PSVersion
# Check when a cmdlet was introduced
Get-Help Get-NetTCPConnection | Select-Object -ExpandProperty Synopsis
# Install PowerShell 7 side-by-side with Windows PowerShell 5.1
# Download from: https://github.com/PowerShell/PowerShell/releases
# Run PS7: pwsh.exe
# Run PS5: powershell.exe
Major Minor Build Revision
----- ----- ----- --------
5 1 19041 4522
Cause 5: Function Not in Scope
A function defined in a script file is only available in that script’s scope unless you dot-source the file or define the function in the global scope. Calling a function before it is defined also causes this error:
# Error: function defined AFTER the call
Invoke-MyHelper "data" # Error — not defined yet
function Invoke-MyHelper {
param([string]$Data)
Write-Host "Processing: $Data"
}
# Fix: define functions before using them, or dot-source the file
. .\MyFunctions.ps1
Invoke-MyHelper "data" # Works after dot-sourcing
# Verify a function exists in current scope
Get-Command Invoke-MyHelper -ErrorAction SilentlyContinue
How to Verify Command Exists
Before assuming a command is broken, verify it exists in the current session using these diagnostic techniques:
$cmdName = "Get-ADUser"
# Method 1: Get-Command
$cmd = Get-Command $cmdName -ErrorAction SilentlyContinue
if ($cmd) {
Write-Host "Found: $($cmd.Name) from $($cmd.Source)"
} else {
Write-Host "NOT FOUND: $cmdName"
# Search for similar names
Get-Command -Name "*$($cmdName.Split('-')[1])*" | Format-Table Name, Source
}
# Method 2: Check module availability
Get-Module -ListAvailable | Where-Object ExportedCommands -like "*$cmdName*"
NOT FOUND: Get-ADUser
Common Errors and Fixes
-
Running PowerShell commands in CMD window. The prompt looks similar but the behavior is entirely different. Check for
PSat the start of the prompt. If you do not see it, typepwshorpowershellto launch a PowerShell session before running your commands. -
Module installed but not imported in current session.
Install-Moduledownloads the module files but does not make cmdlets available. RunImport-Module ModuleNameto load it into the session. Or add the import to your$PROFILEto auto-load it in every session.
Related Cmdlets / See Also
Wrapping Up
The “not recognized as a cmdlet” error has exactly five causes: typo, missing module import, wrong shell (CMD vs PowerShell), outdated PowerShell version, or function not in scope. Check them in order, use Get-Command -Name "*keyword*" to find correct names, and Import-Module to make module cmdlets available in the current session.


