From a script I needed to schedule a project in RES Automation Manager 2011 for a particular server.

imageThis can be done with the WMC.exe commandline tool as documented in the Admin Guide. However we must specify the agent’s GUID instead of it’s name. We can of course use the AM console to get the agent’s GUID but it’s more flexible to script this.

imageUnfortunately there’s no API we can call so I am directly quering the AM database using a PowerShell script.

The script read the database server and database name from the registry so it assumes you have the AM console installed.

It also assumes that you are using a SQL database and that the user running the script has permissions to read the database.

Usage example: