Need to mass update computer to use a policy


We have hunderds of computers in a few groups. We created some Policies to apply to the groups, but the computers do not automatically inherit the policies. We noticed that all computers had bee set to None by default for a policy and that seems to be causing the issue.

Is there an API script where I can update all computers so they are setup to Inherit from Group?