locked
Setting Win32_DCOMApplicationSetting.RemoteServerName using Powershell RRS feed

  • Question

  • Hello,

    I am using Windows Server 2008R2 and Powershell 3.0 (Upgrading to 4.0)

    I want to be able to set the RemoteServerName and clear the LocalService on a DCOMApplicationSetting.

    I tried:

    $dcom = Get-WMIObject -Class Win32_DCOMApplicationSetting -Filter 'Description="BCL easyPDF SDK 7 Loader"' -EnableAllPrivileges
    $dcom.RemoteServerName = "AnotherServer"
    $dcom.put()
    

    Which executes without error, but does not make any changes.

    I loaded up Win32_DCOMApplicationSetting in WbemTest, looked at the RemoteServerName property, and it has a write qualifier set to true.

    Where am I going wrong?

    How can I change the RemoteServerName without using the dcomcnfg gui?

    Many thanks,
    Stuart.


    Wednesday, March 26, 2014 4:35 AM

Answers

  • DCOM has the least amount of automation for many reasons.

    You can set very little through WMI.  Only permissions are settable.  The COM installer API can manage these settings but, as far as I know, there is no scripting access to this.


    ¯\_(ツ)_/¯

    • Marked as answer by SWhelan Wednesday, March 26, 2014 7:52 PM
    Wednesday, March 26, 2014 5:28 AM

All replies

  • you cannot change the server name.  Why would you think that this is changeable.  THis is where the DCOM app is installed

    See:

    RemoteServerName
                                          Data type: string
                                         Access type: Read-only
                                        Name of the remote server where the application is activated.

    http://msdn.microsoft.com/en-us/library/aa394118(v=vs.85).aspx


    ¯\_(ツ)_/¯

    Wednesday, March 26, 2014 5:02 AM
  • Thanks for taking the time to reply.

    We currently do this on all our win2k8r2 servers using the dcomcnfg gui tool. I am looking for a way to automate this.

    Wednesday, March 26, 2014 5:13 AM
  • What is it that you think you are doing with the GUI tool? 


    ¯\_(ツ)_/¯

    Wednesday, March 26, 2014 5:17 AM
  • DCOM has the least amount of automation for many reasons.

    You can set very little through WMI.  Only permissions are settable.  The COM installer API can manage these settings but, as far as I know, there is no scripting access to this.


    ¯\_(ツ)_/¯

    • Marked as answer by SWhelan Wednesday, March 26, 2014 7:52 PM
    Wednesday, March 26, 2014 5:28 AM
  • DCOM has the least amount of automation for many reasons.

    You can set very little through WMI.  Only permissions are settable.  The COM installer API can manage these settings but, as far as I know, there is no scripting access to this.


    ¯\_(ツ)_/¯

    Okay, so I am going to need to write a .net command line app to set the value via COM.

    Thanks for the reply.

    Wednesday, March 26, 2014 7:51 PM