![]() ![]() IResultObject siteDefinition = Component',SiteCode='" + siteCode + "',ItemName='Remote Control'") Public void EnableDisableRemoteControlClientAgent(WqlConnectionManager connection, ' Display the client agent settings after the change. ' Refresh the in-memory copy of the site control file and get the client component section. ![]() SwbemServices.ExecMethod "SMS_SiteControlFile.Filetype=1,Sitecode=""" & siteCode & """", "Commit",, , swbemContext ObjSWbemInst.Flags = enableDisableClientAgent ' Set the client agent by setting the Flags value to 0 or 1 using the enableDisableClientAgent variable. Wscript.Echo objSWbemInst.Flags & " (0 = Disabled, 1 = Enabled)" Wscript.Echo objSWbemInst.ClientComponentName Wscript.Echo "Properties - Before Change" ' Display client agent settings before change. Set objSWbemInst = swbemServices.Get("SMS_SCI_ClientComp.Filetype=1,Itemtype='Client Component',Sitecode='" & siteCode & "',ItemName='Remote Control'",, swbemContext) SwbemServices.ExecMethod "SMS_SiteControlFile.Filetype=1,Sitecode=""" & siteCode & """", "Refresh",, , swbemContext ![]() ' Load site control file and get client component section. Sub EnableDisableRemoteControlClientAgent(swbemServices, _ The following example method enables or disables the Remote Tools Client Agent by using the SMS_SCI_ClientComp class to connect to the site control file and change properties.įor information about calling the sample code, see Calling Configuration Manager Code Snippets. Loop through the array of available properties, making changes as needed.Ĭommit the changes to the site control file. Make a connection to the Remote Tools Client Agent section of the site control file by using the SMS_SCI_ClientComp class. To enable or disable the Remote Tools Client Agent You enable or disable the Remote Tools Client Agent, in Configuration Manager, by modifying the site control file settings.
0 Comments
Leave a Reply. |