Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. pandu101

    How to run vbscript with elevated rights?

    I need a script to run with admin rights but I dont want to save the user/pass within the script file. Also, what would be the command that allows the script to assign "Authenticated Users" modify rights to a folder? TIA
  2. pandu101

    How to show only certain properties of an event

    I have the following script that pulls security logs showing users who were not able to login to the network. At the moment it does a line by line dump of the entire event log. What I really want is a list of users who had problems logging in. Bonus would be if it could sort by the number of...
  3. pandu101

    How to pull eventlogs during the last week only

    Thanks crobin1! But I heard that get-eventlog does not run remotely, that is why I am using WMI to get the event log remotely. But maybe in v2 of Powershell, they might have added the ability to run it remotely also?
  4. pandu101

    How to pull eventlogs during the last week only

    Actually the full code is this: Function Get-EventsByWmi($computerName,$log,$eventID) #the params defined above are used as inputs here in the function definition { Get-WmiObject -Class win32_NTLogEvent -filter "logfile = '$log' and EventCode = '$eventID'" -computerName $computerName } #end
  5. pandu101

    How to pull eventlogs during the last week only

    Hello, I use the following code to get events from the security log, by computername and event id. I need to take it one step further. I want to pull these events that occurred during the last week. How can I modify the command below to do this? I know it has something to do with...
  6. pandu101

    Error trying to search a database table

    I am trying to run the following query that will look for events with a particular date in a table. The date is saved as a string in the database (SQL 2005). But I get an error stating "Incorrect syntax near 'Sunday" on the following line (the second one). start_date = "Job started: Sunday...
  7. pandu101

    How to insert data into database

    Hi all, started collecting data from an XML file that is created by our backup software. Was able to get a lot of that done thanks to the good folks here. Now I am trying to dump that data into a SQL 2005 db. I am doing this by calling a function named bkupJobTableInsert, But I get errors like...
  8. pandu101

    How to read text as numbers in XML file

    Thanks Skip - is cvar depracated in vbscript? It does not seem to work and someone mentioned in another forum the cvar is only available in VB but not vbscript! Thanks anyways - learned about the split function. Jges! You come thru again! :) Thanks for the detailed code and documentation to...
  9. pandu101

    How to read text as numbers in XML file

    Hello, I am reading the following line from an XML file. There are several such lines in each XML file. However I only want to capture the bytes from each tag and add up the total bytes. This will tell me how much data was backed up (the XML file is produced by our backup software). However...
  10. pandu101

    How to interpret error codes in event log

    Thanks sennister - I already tried eventid.net - they have good info but I want to figure out what the actual error codes mean.
  11. pandu101

    How to interpret error codes in event log

    One of my DC's spitted out almost a thousand instances of the same error before I rebooted it. Now, I am trying to figure out what happened. The error itself is sort of generic - Event ID 2000 - The server's call to a system service failed unexpectedly. There is more useful info in the Data...
  12. pandu101

    How to compare file names (XML file names)

    Yup! That did it! Thanks a lot jges - you rock!
  13. pandu101

    How to compare file names (XML file names)

    Thanks again jges for a great suggestion. I excitedly tried it out but got an error (object does not support this property or method). Upon doing further research, it seems that vbscript does not have a function to return the array size - is this true or just old info? See -...
  14. pandu101

    How to compare file names (XML file names)

    jges, you are right on! There was a mismatch. jobserver was actually listed only as server in the xml doc. While checking the server tag, I came across other issues though. I am looking for another tag called "start_time" and "end_time". But there are multiple "start_time" and "end_time" tags in...
  15. pandu101

    How to increment an array within a loop?

    I am using the code below to parse thru several XML files and print out data from each XML file. It only looks for files that starts with BEX and that are older than 2 days. However the code does not run if there are more than one file to parse. At that point I get the error -- VBSCript runtime...
  16. pandu101

    How to compare file names (XML file names)

    Thanks jges - that worked! I combined the two if statements and now I get the error VBSCript runtime error: Object required:'ElemList.item(...)' The error is in line 17 in the code. I think the error is caused because I am referring to the same item in the elemList array - maybe I need to...
  17. pandu101

    How to compare file names (XML file names)

    Hi, I have the following script that will go thru a folder containing several xml files and then extract data from those XML files. However, I want it to *only* parse XML files that begin with the letters BEX. How can I make this happen? Below is the script. TIA Dim server, filepath...

Part and Inventory Search

Back
Top