You can use the following sample script written in the Microsoft Visual Basic Scripting Edition (VBScript) language to modify the WMI settings that you want to change.
Copy Code | |
---|---|
Sub CommitChange Dim objLocator Dim objService Dim objInstances Dim objInstance Wscript.Echo "Connecting to local WMI store..." Set objLocator = CreateObject("WbemScripting.SWbemLocator") Set objService = objLocator.ConnectServer(".", "root\cimv2") Wscript.Echo "select * from MSFT_SIPAddressBookSetting" Set objInstances = objService.ExecQuery("select * from MSFT_SIPAddressBookSetting") If IsNull(objInstances) Or (objInstances.Count = 0) Then Wscript.Echo "Error: No instance" Else For Each objInstance in objInstances objInstance.Properties_.Item("MaxDeltaFileSizePercentage").Value = 1500 objInstance.Properties_.Item("RunTime").Value = 200 objInstance.Properties_.Item("OutputLocation").Value = \\server\ABServer" objInstance.Properties_.Item("SynchronizePollingIntervalSecs").Value = 500 objInstance.Properties_.Item("UseNormalizationRules").Value ="True" objInstance.Put_ wscript.Echo "Done" Exit For Next End If Wscript.Echo "" End Sub |