I have do 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?