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

  1. sotghalz

    Netdom Help

    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.
  2. sotghalz

    Netdom 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.
  3. sotghalz

    Netdom Help

    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...
  4. sotghalz

    Netdom Help

    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 =...
  5. sotghalz

    Netdom Help

    ...computers new name","Windows 2k3 Netdom Rename Script") dUserName = "username" Call WSHShell.Run("cmd.exe /K netdom renamecomputer " & sOldCname & " /newname:" & sNewCname & _ " /userd:swab-n\" & dUserName &" /passwordd:* /usero:swab-n\" & dUserName &" /passwordo:* /force /reboot:10")
  6. sotghalz

    LastPasswordSet

    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...
  7. sotghalz

    LastPasswordSet

    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).
  8. sotghalz

    LastPasswordSet

    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 =...
  9. sotghalz

    LastPasswordSet

    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...
  10. sotghalz

    LastPasswordSet

    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...
  11. sotghalz

    Clear Service Tag

    Thanks for the debug code: Results: -462 -The remote server machine does not exist or is unavailable -Microsoft VBScript runtime error
  12. sotghalz

    Clear Service Tag

    I just changed it all to Win32_SystemEnclosure and still got a "Error WMI" Set colSMBIOS = objWMIService.ExecQuery("Select * from Win32_SystemEnclosure") Currently troubleshooting...
  13. sotghalz

    Clear Service Tag

    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...
  14. sotghalz

    Clear Service Tag

    ..._ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colBIOS = objWMIService.ExecQuery("Select * from Win32_BIOS") For each objBIOS in colBIOS objFile.WriteLine strComputer & "," & objBIOS.Manufacturer & "," & objBIOS.SerialNumber Next...
  15. sotghalz

    ForReading - GetObject Help

    Thanks for the help. It works out great. I can move forward with this task.
  16. sotghalz

    ForReading - GetObject Help

    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.
  17. sotghalz

    ForReading - GetObject Help

    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...
  18. sotghalz

    ForReading - GetObject Help

    ...True) Set objWMIService = GetObject _ ("winmgmts:\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery _ ("Select * from Win32_LogicalDisk") For Each objItem in colItems Select Case objItem.DriveType Case 1 strDriveType = "Drive could not be determined." Case 2...
  19. sotghalz

    schtasks.exe /create

    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 =...
  20. sotghalz

    Delete a List of Folders on Multiple Worlstations

    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 =...

Part and Inventory Search

Back
Top