Install Group Policy Management (on a server 2008 R2 or higher)
Then you are able to run import-module grouppolicy
So, to add a computer to a ‘security filter’ you need to add GpoApply (which is both read and apply permissions) and it will then show in the security filtering pane
The command to do so is
Set-GPPermissions -Name “MyTest” -PermissionLevel GpoApply -TargetName “TheComputer” -TargetType Computer
To Remove the computer is quite simple, same command but set permissionlevel to none
Set-GPPermissions -Name “MyTest” -PermissionLevel None -TargetName “TheComputer” -TargetType Computer