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!

Recent content by cdtech1980

  1. cdtech1980

    Technique to start script after some task is done.

    I recall during my powershell training there was a technique or way to have scripts start in order and only start when the first one is completed. For example. Script A calls Script B. Script A will only continue on with next tasks when Script B completes. Each of these scripts are ps1. I am...
  2. cdtech1980

    Service Status

    Hi can you just do this; $svcIMA = Get-Service spooler | Select-Object Status $svcIMA.Status Running
  3. cdtech1980

    Properly formatted Invoke-Command help

    Pure genius! It worked!
  4. cdtech1980

    Properly formatted Invoke-Command help

    I am trying to run the command below on multiple computers so I want to use invoke-command. It works fine in powershell and command line all by itself. But when I use invoke command and pass variables the nightmare happens.: D:\Apache\bin\httpd.exe -f D:\apacheconfig\www.foo.com\httpd.conf -k...
  5. cdtech1980

    Validate a param

    It works. Thanks man!
  6. cdtech1980

    Validate a param

    Let me get rid of mandatory =false. Thanks for the results.
  7. cdtech1980

    Validate a param

    Hi I have this up top. I do not want it to be mandatory. If the user does not have -foo I want the script to continue to the else statement. param( [Parameter(Mandatory=$false,Position=0)] [ValidateNotNullOrEmpty()] [String] $foo ) Even just tried param(...
  8. cdtech1980

    Validate a param

    Hi Blister this did not work. I have also tried if (!($foo -eq $NULL)) { first } else { second } however it still returns me to the first if statement regardless if I run my script with parameter or not. Example: .\myscript.ps1 $foo "hello" or .\myscript.ps1 I get...
  9. cdtech1980

    Validate a param

    Hi I am using a parameter called foo which I set to mandatory=$false. This means it is not required. In my script I would like to test if it exists or not and do something if it does. For example if someone runs .\myscripts.ps1 -FOO valueisgiven the scripts will do something if not just...
  10. cdtech1980

    String to Array

    Sure thing. I rated two yesterday. Set spn is sweet!
  11. cdtech1980

    String to Array

    Mark thanks for the tip. I think I was over thinking it. ports.txt contains IP:port : 0.0.0.0:13125 IP:port : 0.0.0.0:13126 IP:port : 0.0.0.0:13128 IP:port : 0.0.0.0:13130 IP:port : 0.0.0.0:13131 IP:port : 0.0.0.0:13132 IP:port : 0.0.0.0:13133 IP:port : 0.0.0.0:13134 IP:port : 0.0.0.0:13137...
  12. cdtech1980

    String to Array

    Hi all I am new to powershell and have a beginner question. I have a variable that is storing a bunch of strings based on a Select-string command-let I use. $results | Select-String 'port' Results in: IP:port : 0.0.0.0:13125 IP:port : 0.0.0.0:13126 IP:port...
  13. cdtech1980

    Monitor DC

    I was wondering if there are key function I should be monitoring on DC? (minus hardware and security aspects) I have come up with 4 things: monitor key services DNS WINS etc, replication occurring in a timely manner, dns query functioning, ldap functioning (perform query). The reason I ask is...
  14. cdtech1980

    multiple host A records

    I was reading that sometime this might do more harm then good. How does scavenging work do I just flip the switch. What if I have host A records that I have entered manually will those be lost?
  15. cdtech1980

    DNS Server

    Are there any issues that can come out of going from ad integrated dns to non?

Part and Inventory Search

Back
Top