none
Too powerful or complicated of a script? RRS feed

  • Question

  • I am looking to create a script that may be way out of scripting league (or at least out of my knowledge) with PowerShell. I have a Ping script that will pull systems from a .txt file and output the results into a .csv. I then want the script to look into that .csv file, pull out whichever systems resulted with "Pinged", and run another update script that I have on my local system. Once that update script is done installing patches, I need the system to reboot, and once it is started up, need it to run all of the cycles under the 'Actions' tab in Config Manager in Control Panel.

    Is this something that is way too complicated or powerful to complete? My biggest thing is how will the script know once the system is finished installing Windows Updates to then go and reboot itself. Any help is much appreciated. Even if it is just telling me I am a bit out of context! Thanks guys.

    Monday, July 27, 2015 8:36 AM

Answers

  • Hi Rohsler,

    These are the questions that you should ask your, self, how I'm I doing all this right now or how can I do this using GUI or individual commands.

    List out all the task into separate projects or scripts first, target it for single PC first. One its working try to intregrate it so that it happens all in a single flow. Then add in multiple computers.

    One problem you might come across is running these things parallely.

    "My biggest thing is how will the script know once the system is finished installing Windows Updates to then go and reboot itself."

    If you use PowerShell in the first place to start the update, it shoudnot be problem to know, when it ends.

    Use a PowerShell Module to Run Windows Update

    http://blogs.technet.com/b/heyscriptingguy/archive/2012/11/08/use-a-powershell-module-to-run-windows-update.aspx


    Regards,

    Satyajit

    Please “Vote As Helpful” if you find my contribution useful or “Mark As Answer” if it does answer your question. That will encourage me - and others - to take time out to help you.

    • Marked as answer by Rohsler01 Tuesday, July 28, 2015 5:47 AM
    Monday, July 27, 2015 10:56 AM

All replies

  • You are not asking a question.  You are asking for a solution.  We can answer specific questions.  If you need design help you will need to contact a consultant.

    Your post is also technically very vague. It is a collection of ideas and a shopping list. It is not a question.

    You could also start by looking into pre-written scripts here: https://gallery.technet.microsoft.com/ScriptCenter/ 


    \_(ツ)_/


    • Edited by jrv Monday, July 27, 2015 9:28 AM
    Monday, July 27, 2015 9:27 AM
  • Hi Rohsler,

    These are the questions that you should ask your, self, how I'm I doing all this right now or how can I do this using GUI or individual commands.

    List out all the task into separate projects or scripts first, target it for single PC first. One its working try to intregrate it so that it happens all in a single flow. Then add in multiple computers.

    One problem you might come across is running these things parallely.

    "My biggest thing is how will the script know once the system is finished installing Windows Updates to then go and reboot itself."

    If you use PowerShell in the first place to start the update, it shoudnot be problem to know, when it ends.

    Use a PowerShell Module to Run Windows Update

    http://blogs.technet.com/b/heyscriptingguy/archive/2012/11/08/use-a-powershell-module-to-run-windows-update.aspx


    Regards,

    Satyajit

    Please “Vote As Helpful” if you find my contribution useful or “Mark As Answer” if it does answer your question. That will encourage me - and others - to take time out to help you.

    • Marked as answer by Rohsler01 Tuesday, July 28, 2015 5:47 AM
    Monday, July 27, 2015 10:56 AM
  • Satyajit,

    Thanks for the response. I will look into everything I can to try different ways about this. Thanks again.

    Cheers.

    Tuesday, July 28, 2015 5:48 AM