I'm working with my coworker on a PS script that has multiple lines and calls in an entered variable.

The script itself is:

$date = #catreqdate#

Get-ChildItem .\C:\Wmars\*.sav | Where-Object {$_.Lastwritetime -gt $date} | rename-item -newname { [io.path]::ChangeExtension($_.name, '.req') }

So my Kaseya Procedure uses getVariable to define the #catreqdate# as a MM/DD/YYYY value that the person executing the procedure has to enter.  What I'm trying to do is run the two lines.  So I'm trying to use the executePowershellCommand64bitSystem to run the script.  My question is, is there a way to use the executePowershellCommand with the "Powershell Arguments and Commands" line for the multi line PS script.  The PS script failed if I directly used the #catreqdate# variable in place of $date.