Add Dcom protocol via wmi properties programmatically

To use the fixed wmi port on my server I need to do the following:

1.Open Component Services

2. Open Dcom Config

3.Open Windows Management and Instrumentation Properties

4.Go to the "Endpoints" tab

5. Click Add

6. Select TCP-IP connection oriented and use a static endpoint with the selected port

I would like to do this programmatically. I tried to do it using powershell and was able to get the WMI object with this line of code:

$wmiobj = Get-WMIObject -Class Win32_DCOMApplicationSetting -Filter 'Description="Windows Management and Instrumentation"'    

      

But I didn't understand how to use this object to change settings, even after searching the web and site. I found a list of properties like AppID and LocalService name, but no methods that can be used to change the correct settings.

How can I use this object to change wmi settings like above?

Thanks in advance.

+3
powershell wmi dcom


source to share


No one has answered this question yet

Check out similar questions:

4
How to change DCOM config id programmatically
2
WMI - Update DCOM Settings
2
Silently install DCOM and configure its startup options
1
WMI access on a remote server (in a different domain)
1
How do I set up a replication scope in an Integrated DNS AD zone using WMI?
1
What does it mean that WQL Select * from SQLService returns 0 rows in WBEMTest?
0
Query event logs over WMI and the nature of DCOM
0
Collection of application metrics for Citrix
0
Encapsulating Windows Management Through Web Services: WMI / RPC, WinRM, or PowerShell?
-1
Trying to configure Juniper firewall



All Articles
Loading...
X
Show
Funny
Dev
Pics