Super Simple Variable Question

Hellooo. I appear to have forgotten everything i ever knew and need a bit of guidance. I’ve got a script that lists the paths to files in a directory written in the last 7 days

#--Change the name with directory you want to visit --# $dir_to_look="C:drives" #--You may change the number of days of your choice --# $seven_days_backdate=$(Get-Date).AddDays(-7) 

etc etc etc

However this is to use in Autotask RMM as a batch tool and i’d like to make it so that $dir_to_look is a variable so i can set it each time i run it from autotask. How do i do this? Just leave $dir_to_look empty then let it be set in autotask?

submitted by /u/samuelma
[link] [comments]

Leave a Reply