What is ByPropertyName, ByValue, SwitchParameter, Typename

This topic contains 2 replies, has 3 voices, and was last updated by  Simon B 1 week, 3 days ago.

  • Author
    Posts
  • #76993

    Taj
    Participant

    Hello Gents,

    I've started studying powershell, i bought Learn Windows Powershell in a Month of Lunches, so please excuse my newbie questions.

    So, i'm at chapter 9, the pipeline deeper and i'm always confused when i see the following:

    1- Typename, when you do get-member, Don always emphasize the need to have an eye on that but i'm not sure what that is, and how can i use that information with piping

    2- Since i don't have programming background the following also confuse me when i look at the parameters of a Cmdlet
    Can someone please explain me what are the following:
    a- Accept pipeline input? True (ByPropertyName) —- what is by propertyname and how different it is from ByValue
    b- -DisplayName —- what is String ? and how different it is from SwitchParameter

    3- In the help file, what are INPUTS and OUTPUTS, for example:
    INPUTS
    System.ServiceProcess.ServiceController, System.String
    You can pipe a service object or a service name to this cmdlet.

    OUTPUTS
    System.ServiceProcess.ServiceController
    This cmdlet returns objects that represent the services on the computer.

    The problem is when i google them, i get a lot of scripts lol, so it's kind of hard to find an explination.

    Thanks in advance ! 🙂

  • #77098

    Don Jones
    Keymaster

    Jeff and I literally wrote a book about all that. "Learn PowerShell Scripting in a Month of Lunches." Available now on Manning.com :). Most of that's also covered in the about_ help files.

  • #77106

    Simon B
    Participant

    Also https://mva.microsoft.com/ is a good source of info with lots of videos

You must be logged in to reply to this topic.