I have powershell script with input parameters, but when I run it, some input is ignored and script just uses same parameters as in previous run.
I assume ps remembers some frequent parameters in cache, is there a way how to force it to always take new parameters?
Called with
-ExecutionPolicy bypass
-command xxx.ps1
-subject "Report: xxx"
-from "xxx@yyy.com"
-fordate "xxxx-xx-xx"
-path "xxx\"
-fileName "xxx.zip"
Parameter declaration in script
Param(
$subject,
$from,
[DateTime]$fordate,
$path,
$fileName
)
Thanks a lot