I have a bit of VB code I took from the Microsoft Technet Scripting resource
site as follows:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,(Security)}!\\" & _
strComputer & "\root\cimv2")
Set colLogFiles = objWMIService.ExecQuery _
("Select * from Win32_NTEventLogFile")
For each objLogfile in colLogFiles
strLogFileName = objLogfile.Name
Set wmiSWbemObject = GetObject _
("winmgmts:{impersonationLevel=Impersonate}!\\.\root\cimv2:" _
& "Win32_NTEventlogFile.Name='" & strLogFileName & "'")
wmiSWbemObject.MaxFileSize = 2500000000
wmiSWbemObject.OverwriteOutdated = 14
wmiSWbemObject.Put_
Next
and found it errors upon running with the following error message, "an
amended object cannot be put unless WBEM_FLAG_USE_AMENDED_QUALIFIERS is
specified"..... how do I get around this? I've checked on the MSDN site fo
help but it all goes a little over my head!!!.
Please can any clever person help?
Philip