Any suggestions on how to clean up/optimize the following script?
'---INSTRUCTIONS:---------------------------------------------------------------------
'
' 1. Obtain list of computers from AD (IP address will work also)
' 2. Copy list of computers into a text file named "computers.txt"
'
'...
OK, I have three seperate functions that I would like to combine into one. However, I need to find out the most effective way of using a Function to output three different string vaules.
For example, I have a function to find a MAC address, IP address and Dell Serial Number. How can these be...
I must be half asleep - I can't for the life of me figure out why the code is throwing an error. Please help.
SET objFSO = CreateObject("Scripting.fileSystemObject")
SET objFileTEXT = objFSO.OpenTextFile("hosts.txt",2,TRUE)
DO UNTIL objFileTEXT.AtEndOfStream
strComputer =...
Whom it may concern: I am trying to find the formula for finding specific sections in a string.
My string format:
<USER> ; <MAC> ; <IP> ; <SN> ; <OFFICE> ; <ADMIN>
Example:
john.key ; MAC: 00:18:8B:D6:29:B6 ; IP: 192.168.1.1 ; SN: ####### ; US ARMY ; SPC John Key
What would be the formula to...
OK, this post is in connection with another post:
http://www.tek-tips.com/viewthread.cfm?qid=1515298&page=1
Let's say I have three specific computer names. And on those three specific computers, I want to change the description field in Active Directory.
What would be the vbscript code for...
Whom it may concern: I am working on a script that reads a text file containing computer names on each. And for each computer in the given text file, the script will find the MAC Address, IP address, Serial Number for that computer.
Now my problem is this issue. I want to then take that read...
ALL,
This portion of code is not working for me...why?
adoRecordset.Fields("description").Value
I am trying to extract the "Description" field of computer objects out of Active Directory (AD) utilizing ADO language.
I keep getting an
Line: 94
Char: 5
error: "Item cannot be found in the...
So, thinking out loud here. I want to know if there is a way to contain a list within a script running.
For example, I have a script that changes an admin password on all systems in my OU based on a list of computer names. The VBScript changes the password on each machine grabing the machine...
I am trying to utilize the "objFile.Copy" method.
However, I run into an error when the script reaches an encrypted file. I am copying files from my workstation to a server.
Any suggestions on how to copy over encrypted files?
P.S. By "encrypted", I mean clicking Properties > Advanced... >...
OK, I had Office 2003 and created a script that works with Excel 2003. Then I recently updated to 2007. Now the script fails. I am trying to run the below code without getting the below error message. Please help. Any ideas/solutions?
Set myExcel = CreateObject("Excel.Application")...
I need help. I have looked up various websites; however, I am getting conflicting results. May someone please confirm or deny if Select Case statements are slower than If then-if ladders? I have a script that seams to be running slower now since I moved over to Select Case VS. If Then. Before I...
FUNCTION Backup(RepSource,RepDest)
ON ERROR RESUME NEXT
DIM objSource(1), objDest, objDestCompare
SET objSource(0)=objFSO.GetFolder(RepSource)
ErrCheck
IF NOT objFSO.FolderExists(RepDest) THEN objFSO.CreateFolder(RepDest)
ErrCheck
FOR EACH objFile IN objSource(0).Files
strExt...
OK, I am not Korean; however, I am a United States soldier over here in South Korea. I have a portion of my script that is not working right and would like some input.
When my script (a backup script) gets to a file that is named with Korean Characters, I received the below error.
My code is...
Hello everyone!
I have a script here that I am working on bit by bit...it is my largest script to date and frankly I want to know what everyone thinks and if improvements can be made to the coding? Either by rearranging, compacting, and/or a most effienct way to do the script?
How about it...
Hello all!
I am trying to create a TimeIt function...however, I am running into one trouble area. I have the following script; however, when the clock reaches past Midnight, the timing goes all wrong - I can't for the life of me figure out what I am doing wrong here...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.