Sure. You can either schedule the task or use WMI.

Search the UDF forum for examples of both methods.