locked
Examine a script RRS feed

  • Question

  • Find the four errors and correct this script so that it will run correctly to get a name of the service from the user, and get the properties, Name, Status, DependentServices, of the service, and format it as a table with the use of the AutoSize SwitchParameter.

    $Services = Read-Host "Please provide the name of the service you want to see
    Get-Services "$Services" |
    Select-Object Name, Status, DependentServices 
    Format-Table AutoSize

    Saturday, May 11, 2019 4:04 PM

All replies

  • Sorry.  We do not fix scripts found on the Internet.  This is not a game forum.

    Before posting in this forum please read the following two posts:

    How to ask   questions in a technical forum

    This Forum is for Scripting   Questions Rather than script requests

    Read the following help article to learn what you are doing wrong.

     help about_Pipelines


    \_(ツ)_/


    • Edited by jrv Saturday, May 11, 2019 4:45 PM
    Saturday, May 11, 2019 4:44 PM
  • Sorry.  We do not fix scripts found on the Internet.  


    \_(ツ)_/


    Found on the Internet???? I think this was found on a homework assignment!


    Keith

    Saturday, May 11, 2019 5:33 PM
  • We also do not do homework.  If you want to learn then your homework is your responsibility.  I gave you the information you need to figure it out.

    If you cannot figure it out from the provided information then you should avoid working in the computer industry.  You are not a person with a technical mind.  There are many other professions that do not require technical skills.  Art, entertainment, athlete, fisherman, etc...


    \_(ツ)_/

    Saturday, May 11, 2019 5:53 PM
  • You have a future in management.
    Monday, May 13, 2019 3:51 AM
  • You have a future in management.

    At Wendys?


    \_(ツ)_/

    Monday, May 13, 2019 4:23 AM