I am trying to deploy a new scheduled task using PSADT. The deployment is comprised of 3 steps:
Pre-Install
Created New Folder
Copy items from SupportFiles directory to the newly created directory
Installation
Run the following: schtasks /create /tn “Check Camera Driver” /xml “($dirFiles)\Check Camera Driver.xml” /ru SYSTEM
The pre-installation tasks run fine but the command I need to run doesn’t seem to run as there is not error in the PSADT log and no indication it was referenced during the deployment. Also, the task I need doesn’t show in the Scheduled Tasks. Running the item in the Installation section of the Deploy-Application script manually from PS is successful.
Can someone please advise the proper way to run powershell modules/commands in the script?