PHV,
Thanks for the reminder. I was still thinking vbscript and not DOS. I should have figured that out because I have used it before. Thanks again for everybody’s help.
tsuji,
Thanks that worked.
PSC,
Thanks for the heads up. Fortunately, we have all our XP machines in one OU.
Do you know how to output the results to a text file? Errors and successes.
Good Morning PSC,
I finally got the script to run. There was a little tweaking that I had to perform but it works great.
I removed oTSInput.Close it made the next line fail. (oTSInput not Set)
I also removed set WSHShell = wscript.createObject("wscript.shell") because it was already used in...
Good Morning PSC,
If I understand this correctly...
I can add the code and a csv file with the old and new computer names in one cell separated by a comma:Set oFSO = CreateObject("Scripting.FileSystemObject")
set WSHShell = wscript.createObject("wscript.shell")
Set oTSInput =...
Good Afternoon,
Is there a way to read from two separate text files (or one) and have them populate "sOldCname" and "sNewCname". Then run WSHShell.Run in a "For Each In"?
Currently, I have a InputBox for "sOldCname" and "sNewCname" but, I don’t want to input for over 800 workstations.
Any...
PSC,
To answer the question I used two other script I used in the past to read and and create a text file. Thanks for pointing that out. I removed
Set oFSO = CreateObject("Scripting.FileSystemObject")
and changed
oFSO.OpenTextFile
to
objFSO.OpenTextFile
With my limited experience I should...
PSC,
I just wanted to let you know and for anybody else reading this. If you run this on a domain controller you get all logged in accounts (domain accounts).
PSC,
Thanks for the new code. It worked in the array so I put back in the Input file for reading and also the output file for the results. Thanks for your help.
Here is the final result.
Dim oADSI, oUser, aRemotePCs, sComputer, objFSO, objFile
Const SecsInDay = 86400
Set objFSO =...
Thanks for the scripting lesson. I had to do a little more research and I found out that PasswordLastChanged is not supported but, PasswordAge is. I'm still having an issue with multiple computers (remote computers).
Note: The PasswordLastChanged property is not supported by the WinNT...
thread329-1471433
I'm having any issue with this script. I added a list.txt to read from and also a scriptlog.txt to output the results.
The problem I'm having is the same info shows for all workstations. Also, what is the attribute for "last password set" (when was the password last...
I just changed it all to Win32_SystemEnclosure and still got a "Error WMI"
Set colSMBIOS = objWMIService.ExecQuery("Select * from Win32_SystemEnclosure")
Currently troubleshooting...
intelwizrd and PHV,
Thanks for your help. This helped out a lot. In turn it just showed me how many errors I really have. Is there a way to add the SMBIOS variables on the same line?
objSMBIOS.PartNumber
objSMBIOS.SerialNumber
objSMBIOS.SMBIOSAssetTag
or...
The majority of my errors are...
This script works great except it keeps the service tag for the next line from the previous workstation. How do I clear the vaule?
On Error Resume Next
Const ForAppending = 8
Set oFSO = CreateObject("Scripting.FileSystemObject")
set WSHShell = wscript.createObject("wscript.shell")
Set...
Another issue. I was able to work out the problem listed above but now I'm getting only the information for the first computer in the list and none after.
Thanks for your help. There was a typo here
arrComputers = Split(objTextFile.RealAll, vbCrLf)
but after some head scratching I figured it out. It works great but, there is one problem. In my list of computers I have my workstation name and a few others for testing. It runs on mine but I...
How do I make this run on a list of computers from a text file?
Const ForAppending = 8
Dim objWMIService, objItem, colItems, strComputer
Dim strDriveType, strDiskSize, strDisk
strComputer = "."
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile _...
I have a list of computers in wslist.txt and after the first computer every other computer gets a different logon account then identified in the vbs. Here is what I have so far:
Dim ru, rp
ru = "domain\account"
rp = "password"
Set WshShell = CreateObject("WScript.Shell")
Set oFSO =...
Thanks for all your input. I ended up with this:
dim oFSO
dim log_file
dim fname
Const ForAppending = 8
On Error Resume Next
fName = "path" & "log_" & Year(now) & "_" & Month(now) & "_" & Day(now) ".txt"
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set log_file =...
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.