# The Term 'param' is not recognized...

**URL:** <https://forums.powershell.org/t/the-term-param-is-not-recognized/15213>\
**Category:** PowerShell Help\
**Created:** [November 11, 2020, 8:21am UTC](https://forums.powershell.org/t/the-term-param-is-not-recognized/15213 "2020-11-11T08:21:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeff-taylor](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/jeff-taylor/32/1015_2.png) [@jeff-taylor](https://forums.powershell.org/u/jeff-taylor)\
**Post date:** [November 11, 2020, 8:21am UTC](https://forums.powershell.org/t/the-term-param-is-not-recognized/15213/1 "2020-11-11T08:21:30Z")

</div>

I have dot sourced a PS script which contains some of the following code:

```
$cred= Get-Credential
param([parameter(Mandatory=$true)] [String]$FileCSV)
$listOU=Import-CSV $FileCSV -Delimiter ";"
ForEach($OU in $listOU){
```

…but it chokes right after get-Cred with

```
param : The term 'param' is not recognized as the name of a cmdlet, function, script file, or operable program.
```

Why is PS balking at this? This is standard Mandatory Parameters, no?

---

<div class="post-metadata">

**Author:** ![kvprasoon](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/kvprasoon/32/4449_2.png) [@kvprasoon](https://forums.powershell.org/u/kvprasoon)\
**Post date:** [November 11, 2020, 7:22pm UTC](https://forums.powershell.org/t/the-term-param-is-not-recognized/15213/2 "2020-11-11T19:22:50Z")

</div>

If using Param() block, then there should not be any executable code above that line.

---

<div class="post-metadata">

**Author:** ![jeff-taylor](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/jeff-taylor/32/1015_2.png) [@jeff-taylor](https://forums.powershell.org/u/jeff-taylor)\
**Post date:** [November 12, 2020, 10:19am UTC](https://forums.powershell.org/t/the-term-param-is-not-recognized/15213/3 "2020-11-12T10:19:39Z")

</div>

Thank you.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:28pm UTC](https://forums.powershell.org/t/the-term-param-is-not-recognized/15213/4 "2024-05-16T20:28:19Z")

</div>


