Moved script for managed machines

Giving some structure