Deferals in SCCM

I’ve set up a test application to all deferral. Running it manually works fine so I know it works. In SCCM, can I use the application model? If so, do I need to set any options like allowing users to interact with the application? Do I set the deadline for the first time I want it to pop up or in the future (like a month)?

Yes, in sccm you create an Application. For install do: Deploy-Application Install
For uninstall: Deploy-Application Uninstall
For repair: Deploy-Application Repair
You can make it run under system or user, depending on the script. Yes, allow interaction otherwise user wont be able to click through UI. When user chooses to defer, it returns a different exit code which you need to add for the application. Default exit code there is 60012, but you can change it inside the xml config. Otherwise SCCM will think an error occurred. Number of deferrals is written to the registry so when to toolkit is run again, it will be checked.

What code type do you set that as?