doesn’t work on windows 2008 r2 x64

it doesn’t work on windows 2008 r2 x64 domain controller because it require elevation.
it is a way to fix the code to make it work?
Thanks