Is it possible to use powershell TimeStamp declared outside job, in the job so I don't have to have the same thing in the script twice? I have multiple TimeStamps, the work in the functions but not the Job. I tried $(using:TimeStamp) but that didn't work. Tried using curly brackets to "call" it. If I understand correctly TimeStamp is just a function. Is there a way to call a function declared outside a Job into it? My timestamps:
filter timestamp.SubDir {$(Get-Date -Format MM-yyyy)}
filter timestamp.FileName {$(Get-Date -Format MM-dd-yyyy)}
filter timestamp.FileStamp {$(Get-Date -Format MM/dd/yyyy_HH:mm:ss)}