How can I manipulate group policy based restriction for the controlpanel and the taskmanager in C#?
Have a look at WMI. Here is a link to an article on WMI Group policy objects: http://msdn.microsoft.com/en-us/library/aa375082(VS.85).aspx
This tool will generate example c# code for you:
WMICodeCreator