I have followed this thread to make my application to connect to other machine but failed. The problems as I encountered is:
Netsh firewall set service RemoteAdmin
Here is my simplified code:
ConnectionOptions options = new ConnectionOptions();
options.Username = userName;
options.Password = password;
scope = new ManagementScope(string.Format("\\\\{0}\\root\\cimv2", computerName), options);
scope.Connect();
Updated 1
I ran WMI diag tool as @Rox suggested in the comment and these are the logs files generated.
Updated 2
I found out my error code (HResult) is -2146233087 but such error code doesn't exist on google
I make it work by importing Local Security Policy of a computer that my code can connect. Here is my config that works