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 strongm 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: *

  • Users: Brycspain
  • Content: Threads
  • Order by date
  1. Brycspain

    DNS A and Pointer records

    I'm trying to script some DNS Atype and PTRtype data entries. I've thoroughly studied the MSDN Library createInstanceFromPropertydata method and queried DNS for pointer and A records for precise examples and every time I run this script, I recieve a Generic Failure error on the first instance...
  2. Brycspain

    Array Input Filtering

    I'm reading a CSV file into an array however, some of the values in the csv file can be either NULL or - values and they can show up randomly in any one of the positions. I don't want these values populated within the properties of my user's accounts. Is there a way to filter these values out...
  3. Brycspain

    wget with credentials

    I'm trying to use wget to strip a jpeg camera image from an external web page every 30 seconds and I want do this 10 hours per day. I know wget will place the image in the same folder it runs from however, I want to rename the images 1 to 1200 and place them in a folder with the current day's...
  4. Brycspain

    Ctrl-C out of a Continuous Ping in Powershell

    Probably the wrong forum for this but I was wondering if anyone else has had this problem too. Or this by design?
  5. Brycspain

    Feeding a Foreach Loop Into A Function

    Markdmac sent me this really nice function that converts the sAMAccountName into a Distinguished name. I have a text file with 600 or so usernames that I would like to feed into this function using a foreach loop and send the output to the screen. I am having no luck finding examples on the...
  6. Brycspain

    %comspec%

    I create a lot of websites in my environment and would like to use a script to run my setspn commands. I can do it like this however, it defeats the purpose unless I can inject variables with input boxes or arrays. objShell.Run("%COMSPEC% /k Echo Y| setspn.exe -A http/testsite server1", 1...
  7. Brycspain

    Split Function

    I'm trying to take a text file with about 45,000 entries similar to this format: \\Servername\share\folder\folder\file.xls The number of subfolders varies. What I need to do is get rid of everything to the left to include the last \. I was working with the split function but don't know how...
  8. Brycspain

    HTA Output Font Color

    I've been messing around with HTA's lately and was trying some font manipulation within the vbscript part of my code however, I'm having a hard time understanding the syntax of it. I have some if then statements with coresponding messages mixed with variables and text fields. For instance, I...
  9. Brycspain

    Questions about Modularizing Code

    I’ve attached a few subs and was having difficulty getting my main sub to read the sub with the dictionary object code. It works great when I add the dictionary code inside the main sub but I wanted to make it look cleaner…is there a way to do it the way I’m trying? This is the line I’m...
  10. Brycspain

    Migrating from 7.2.2 to 7.4.1

    Have a Win 2k3 SP 2 server backing up various win server clients and a network appliance using iScsi. We were looking at utilizing the VCB features for our ever-expanding VM server farm. Anything out of the ordinary on this upgrade that I should be aware of? Thanks in advance.
  11. Brycspain

    ADSI OU help

    Hello, I'm trying to enumerate a set of users in a particular OU and then modify a property in every account. The problem I'm having is I can only pull the Canonical name and I need the sAMAccountName in order to bind to their account. I realize the user.cn returns the Canonical name, is...
  12. Brycspain

    Constraint Violation Occurred.

    I was wondering if someone could take a look at this script and tell me what could be causing a "Constraint Violation Occurred" error on the highlighted line towards the end of my script. The script halts on that line and gives off the following: (167, 3) (null): A constraint violation...
  13. Brycspain

    Send Email from Class Object

    I found this log file object class snippet and wanted to know how I could modify it to send the log it creates through email. I tried to add the sendmail sub within the Class object however I received no errors. Any help would be appreciated...thank you in advance. Class CLogFile Dim...
  14. Brycspain

    Parsing Printer Names Out of Txt Files

    I'm reading a list of printers into a dic array and using the printer name as a variable to parse out the same name from a series of txt files. For each instance of a unique printer name, I want the script to either create a new file with the printer name or append to a file if one already...
  15. Brycspain

    Find Computers with Static IP addresses

    I have a list of about 1400 PC's and wanted to run a WMI querry against each one to find out if they have a static IP address. I can run a script to check for active DHCP however, I would then have to compare that list to my full list of computers to see which ones are using static IPs. Ive...
  16. Brycspain

    Help with ADSI

    I'm trying to find if an executable exists and if so, I want the script to write out the computer name to a text file. I have 3 problems: 1. I would normally do more research and testing however, I have to have this completed in a few hours. 2. I'm not that familiar with using ADSI and 3...
  17. Brycspain

    Used disk space

    I'm trying to get used disk space on a server however, usedspace isn't the right syntax for the com object. Could someone tell me where to look or tell me what the syntax is please? Thanks Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set colHardDrives =...
  18. Brycspain

    Clearing AD user account attribute using Dictionary Array

    Hello, Trying to clear the office field in the user account properties in AD. Since I have about 400 users I started with the script to clear one account and am trying to iterate through all the accounts by using the dictionary object, however, I'm getting an error in line 13: VScript runtime...
  19. Brycspain

    Help With An Array

    I'm trying to write a disk collection to a text file using WMI and I seem to be missing an object somewhere. I looked up the error code ive been getting (800A01A8 oject required: '0') and can't seem to figure out where I'm going wrong. IVe bolded the line I'm getting the error on. I tried to...
  20. Brycspain

    Writing Event Logs to SQL Database

    I'm trying to copy event logs from all of my servers to a centralized database and I'm having problems transferring the date/time fields and was wondering what any of you could do to get me started in the right direction. I'm using the standard: objRS("TimeWritten") = objEvent.Timewritten On...

Part and Inventory Search

Back
Top