rzander / cmcollctr

Collection Commander
Microsoft Public License
11 stars 4 forks source link

Client and SCCM Server in different domain #9

Closed wbaeck closed 6 years ago

wbaeck commented 6 years ago

Our Administration Client is in a different Domain than the SCCM Server. So we are unable to connect to the Server by using Right-Click-Tool. Please add Feature to define DNS Suffix for the SCCM Server in config file.

Issue is in "Program.cs" (line 175): string sScope = sPath.Split(':')[0]+"add SCCM Server DNS Suffix";

rzander commented 6 years ago

In the .config File there is a 'FQDN' Property which can be used to append a fixed DNS Domain... If you start the tool with a right click on a collection in ConfigMgr, you should get the FQDN of the computers automatically !

wbaeck commented 6 years ago

I can see that the FQDN is used for the tool to connect to the clients. But I have a different issue. My Management Station is in a different domain than the SCCM Server. When Right-Click on SCCM Management Console you pass the "##SUB:__PATH## where the server name is not fully qualified. So CMCollCtr can't connect to the SCCM Server and fails during startup with an RPC Error.

I have the fix already implemented and wanted to create a pull request for you but don't have permission for this. Basically the line 175 in Programs.cs need to be changed from string sScope = sPath.Split(':')[0] to string sScope = sPath.Replace(sPath.Split('\\')[2], sPath.Split('\\')[2] + Properties.Settings.Default.ServerDNSSuffix);

where "ServerDNSSuffix" is a setting I added.

rzander commented 6 years ago

got it now…

rzander commented 6 years ago

Implemented in https://github.com/rzander/cmcollctr/commit/f8c2064f233cf9f841707cce4d633aac4fdc7896 Will be part of V1.1.0.6

wbaeck commented 6 years ago

Another solution could also be to add a CNAME entry in DNS Server of client domain. Just another option.