I am trying to create a BigFix task that runs a powershell script which -
(1) Copies an XML file from the package to a local path on the target client i.e C:\Temp
(2) Copies an PS1 file from the package to a local path on the target client i.e. C:\Temp
(3) Lastly imports a scheduled task i.e. schtasks.exe /create /TN “Task 1 Name” /XML “C:\Temp\ScheduledTaskToImport.xml” /ru SYSTEM /f
I have created the package via Systems Lifescycle\Software Distribution\Manage Software Distribution and added each of the 3 x associated files so I can create the task.etc
i.e.
-PowershellScriptRunInBigFixTask.ps1
-PowershellScriptSchedTaskRuns.ps1
-ScheduledTaskToImport.xml
How do I copy the files from the package? What is the source path\s?
Look at the actionscript generated for you when you created this package. The files are packaged into a BigFix archive file which the actionscript will extract as one of the first steps. The path to the files is the same as the one it calls the “waithidden powershell.exe” with (normally __download of the current directory). You could then just change the actionscript to be:
This will then have the move commands already present in the actionscript just place the files where you wanted them.
As an aside, you might not want to put these directly in the BES Client folder but rather create a new folder to put them in. That way you don’t clutter up the directory with non-application files. Just make sure the folder exists first before attempting to put things into it.