Why not stick the GPO to the OU the computer is in and be done with it, no scripting neccesary ;\)