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 Wanet Telecoms Ltd 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: Jerz
  • Order by date
  1. Jerz

    InStr not finding stuff that I can see is in there...

    Answer #1 hit the nail on the head. Threw in a strNumber = RTrim(strNumber) and the problem I cound't see vanished into thin air like a bunch of spaces..... Now that the logic is working, it's time to do the work. Thanks again.
  2. Jerz

    InStr not finding stuff that I can see is in there...

    ...For starters I'm just gathering info & echoing to test the logic. Then I'll modify the AD records after I'm certain what the results will be. '**************************************************************** '* Update Description with S/N * '*...
  3. Jerz

    Need help with ADSI (I think) syntax for groups with no members

    ...strNamingContext = "defaultNamingContext" strConnectionString = "Provider=ADsDSOObject" strFilter= "ObjectCategory='group'" '[Functions] **************************************** Function removeCN(inputString) Dim textValue textValue = inputString Dim textLength textLength =...
  4. Jerz

    Need help with ADSI (I think) syntax for groups with no members

    ...all groups, claiming they all have one member. That's not what I'm looking for anyhow. I thought I saw once where sombody used some NOT (!Members=*) qualifier on the query command, but the following does not work for me. 'On Error Resume Next Const ADS_SCOPE_SUBTREE = 2 Set objConnection...
  5. Jerz

    TerminalServicesProfilePath

    The "TerminalServicesProfilePath" property has only ever been accessible via VBS running on a Windows 2003 server, as far as I know. Is this true? I never saw it as a problem, until I got my new vista machine. I thought it would be a 'from here forward' it will work kind of thing, but Vista's...
  6. Jerz

    Having trouble with error trap

    Thanks Tsuji, you've saved me again. I had no idea, and certainly can't find documentation to support it, but you are correct, no user gets made (or not) until the samaccount is populated and commited. Here's what is working for me now: err.clear Set objUser = objOU.Create("User", "cn=" &...
  7. Jerz

    Having trouble with error trap

    OK, my posted answer is wrong. 'objUser = nothing' is always true, so this doesn't work either. Any one have any other ideas?
  8. Jerz

    Having trouble with error trap

    OK, I've answered my own question. Limited testing indicates 'objUser = nothing' is possibly what happens when the user does not get made, as opposed to 'objUser is Nothing', which apparently isn't true in VBSCRIPT even though reality works that way. So this code now seems to function as...
  9. Jerz

    VBscript to rename pc, join domain and add pc to ou

    Try: wscript.sleep 120 set objWSHShell = WScript.CreateObject("WScript.Shell") objWSHShell.Run "shutdown.exe /r /m \\" & strcomputer where strComputer is your netbios name. This is the syntax for rebooting a remote machine - you may need different 'shutdown.exe' syntax to run local - not sure.
  10. Jerz

    Having trouble with error trap

    OK, I've tried err.clear Set objUser = objOU.Create("User", "cn=" & Common & "") If objUser Is Nothing Then objFileRpt.writeline "Error creating " & Common Else Still get no error messages when the create fails, it goes ahead to the 'else' part of the statement. Also tried...
  11. Jerz

    vb script to create security groups in nested ous

    Here's a thought. Scan your AD recursive for all OU's LDAP names. NumStart = instr(txtofOUname,"OU=Users"). If numstart has a value, you've hit one of your target OUs. If numstart <> 0 then use the Mid function, SomeNum=mid(txtofOUname,numstart + 10,3). Now you have your #, make your...
  12. Jerz

    Trouble with FileExists method

    Also, the way it's written, you wouldn't know which statement was causing the issue, objfso.FileExists or reftpgetsccss.Test( strsfxcllog ) = True. A false from either of these would result in the identical "Error: Download failed!" messages. Oh, and Tsuji is correct, the code won't even run...
  13. Jerz

    Trouble with FileExists method

    wscript.echo strsfxcllogsrc right before you use it. Look carefully at what you are asking the script to find.
  14. Jerz

    Having trouble with error trap

    OK,this should be simple, but it seems not to work. err.clear Set objUser = objOU.Create("User", "cn=" & strCommon & "") If err.number = 0 then I'd hoped err.number would be 0 if the user created without issue, or some other number if the create failed for whatever reason (duplicate, illegal...
  15. Jerz

    Broken Trap

    I have what ought to be a pretty simple trap. It either worked (0), or didn't (any non-zero). But I'm seeing users on my incoming list with invalid names (smith, Jr.) that should and do fail to create. But when they fail to create, they also fail to set err.number at something else than 0...
  16. Jerz

    SMS on ESX server

    Our SMS primary site server has been on ESX for over a year. It's awesome.
  17. Jerz

    SMS Manual Install

    \\SMSSERVERNAME\SMSClient\i386\ccmsetup.exe or \\SMSSERVERNAME\SMSClient\i386\client.msi
  18. Jerz

    query help needed

    Can you just run the standard report to see what machines have the first.exe in system32 (indicating the program has been there onec upon a time), export to excel, run again to see where second.exe is currently, export to excel. Use excel to 'subtract' the second list from the first (pivot...
  19. Jerz

    SMS History question

    I first started on SMS 2003, and have dealt with the product since before Sp1. But I've never seen/loaded/used SMS 2.0 (and I've heard I'm lucky for that). Anyhow, the company I work at now has been kind enough to assign me to manage the SMS 2003 product. So at a recent security audit, I'm...
  20. Jerz

    Pass through credentials

    '########################### ' Rename Computer '########################### rc = objWMIComputerSystem.Rename(strNewComputer, _ strDomainPasswd, _ strDomainUser) I'm re-naming a machine, which works fine as above. Company Policy prohibits storing passwords & usernames in the script. When...

Part and Inventory Search

Back
Top