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 SkipVought 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. JustScriptIt

    Unable to read hash value in Powershell

    Thank you Blister, this now works!!!
  2. JustScriptIt

    Unable to read hash value in Powershell

    I am writing a simple script to get more familiar with powershell. This script reads input parameters into a hash $states = @($args) $states write-host Color is $states.color On the command-line, I set the following values$shape = 'circle'; $color = 'pink'; $size = 'large'I then invoke the...
  3. JustScriptIt

    Powershell - now to extract name of variable passed to script

    I am writing powershell script to interface with an external software program our company is using The script needs to take in value of the input parameter and do something. But the problem is, this external software pushes many input parameters with the names •sender-email •sender-ip...
  4. JustScriptIt

    How to Prevent Deadlocks

    Hello, I am scripting in powershell to read from table, and then update table. It works very well - except when another user or program is trying to read or update the table at the same time. This is unavoidable, so I would like to know how to prevent transaction deadlocks. Here is code to...
  5. JustScriptIt

    How to access row and column in CSV file

    By the way, I figured out the solution $file_line = @() $file_multi = @() $file = Get-Content C:\PS\IP_list.csv foreach ($i in $file){ $file_line += $i.split("`n") } foreach ($j in $file_line){ $file_multi += ,@($j.split(",")) } Write-output $file_multi[1][3] Write-output `n...
  6. JustScriptIt

    How to access row and column in CSV file

    Well, I appreciate your help, I didn't mean to upset you :-(
  7. JustScriptIt

    How to access row and column in CSV file

    I think I am not explaning clearly. I am looking to create a powershell script that does the following 1. Reads an IP address from an MS SQL database 2. Opens the CSV file of the IP addresses 3. Determine which range the IP address falls in 4. Perform the necessary updates based on which range...
  8. JustScriptIt

    How to access row and column in CSV file

    Hello, I tried the above code, and got the following output http://www.mediafire.com/i/?mq33lw3ujqb5hj9 I am unable to grasp how to access 1st row, 2nd column, or 2nd row, 4th column, etc, etc. Please help.
  9. JustScriptIt

    How to access row and column in CSV file

    I have powershell code, $file = Import-CSV C:\PS\IP_list.csv Write-Output $file And I have output http://www.mediafire.com/i/?oldomqsvm9w67wl I am unable to figure out how to access 1st row, 2nd column, or 2nd row, 4th column. Help!
  10. JustScriptIt

    Silently turning off a service that requires password

    I am testing a vbscript to turn off a service that requires a password: 'Stop smc.exe service objWMISvc.Create(strPath & "\smc.exe -stop our_secret_password") This works really well, but here's the problem. On the test computer where I am stopping smc.exe, I see a pop-up that prompts the...
  11. JustScriptIt

    Debug VBScript in MS Windows Server 2008

    I googled it, and no luck...will try again.
  12. JustScriptIt

    Debug VBScript in MS Windows Server 2008

    How can I tell what debugger is installed???
  13. JustScriptIt

    Debug VBScript in MS Windows Server 2008

    When I attempt to debug a VBScript in MS Windows Server 2008 via command-line cscript //x script.vbs The debugger never launches. Is there another utility to download. On this particular Windows Server 2008, under Services, I do see that Windows Management Instrumentation has started.
  14. JustScriptIt

    Script to delete filetype from particular directory

    >>you are not checking err.number after the delete<< When I tried this, I got some strange error - will attempt again...
  15. JustScriptIt

    Script to delete filetype from particular directory

    I changed the code around delete as followed ' Turn on error checking in case file is in use On Error Resume Next 'Delete the file objDelFile.DeleteFile sBaseName,true ' Turn off error checking in case file is in use On Error Goto 0 So far, no hiccups
  16. JustScriptIt

    Script to delete filetype from particular directory

    Which On Error Resume Next do I delete, and what error handling do I substitute it with? Earlier today, the program raised run-time errors because certain files, folders weren't accessible. I'd like to script to continue execution even if certain files, folders cannot be accessed. HELP!
  17. JustScriptIt

    Script to delete filetype from particular directory

    By the way, in past scripts I was able to successfully use UNC to delete files, but for some reason, it's not working here.
  18. JustScriptIt

    Script to delete filetype from particular directory

    I am trying to build a script that eventually deletes tmp, err, files from remote computers. There are certain directories that Disk Cleanup just cannot touch, especially if these folders are from other programs installed on Windows. Right now, I'm trying this on my own computer, and it is...
  19. JustScriptIt

    Permission Issue With Accessing Subfolder

    It worked. See modified subroutine for PrintFiles Sub PrintFiles(pCurrentDir) Dim aItem, sParentName, sBaseName For Each aItem In pCurrentDir.Files If fso.GetExtensionName(aItem.Path) = "vbs" Then If Right(fso.GetParentFolderName(aItem.path),1) = "\" Then sParentName =...
  20. JustScriptIt

    Permission Issue With Accessing Subfolder

    I tried replacing d:\ with d:, nut I get the same output :-(

Part and Inventory Search

Back
Top