Error Object reference not set to an instance of an object when registering a GPO.
Error "Object reference not set to an instance of an object" is seen when registering a GPO and not able to connect to GPMC unless a domain controller is specified to connect.
Setup a preferred domain controller in the GPOADmin console.
If issue persist, then search in the ObjectData table to confirm if there is an entry there for the GPO that fails registration.
For searching you may login to the SQL server that hosts GPOADmin SQL database using SQL Server Management Studio and try the following:
1- Expand GPOADmin database, then tables. 2- Right-click dbo.ObjectData table and click on edit top 200 rows. 3- Look under Name column. If you see the name of the GPO there that is failing registration, then delete the entire line.
1- Right-click GPOADmin database. 2- Click New Query. 3- Run the following to find a GPO in the ObjectData table with a name of the GPO that is failing registration: select * from ObjectData where name = 'Type GPO Name Here' 4- Press Execute button or F5 key from your keyboard to run the above query. 5- If you get a result from the query above then run the following command to delete that entry: delete from ObjectData where Name = 'Type GPO Name Here'
Once the above is complete you may try to register the group policy in GPOADmin.
IMPORTANT: There are cases in which you manage for example Default Domain Controllers Policy for multiple domains. If you are having issues registering such policy from a one of the domains, then you need to properly identify the group policy in the database to avoid removing a policy that is correctly registered. You may confirm this by comparing the DomainID of the policy listed under ObjectData table vs the DomainID listed under Domains table and this will confirm form which domain is the policy.