What is ByPropertyName, ByValue, SwitchParameter, Typename

Welcome Forums General PowerShell Q&A What is ByPropertyName, ByValue, SwitchParameter, Typename

This topic contains 2 replies, has 3 voices, and was last updated by

1 year, 5 months ago.

  • Author
  • #76993

    Points: 0
    Rank: Member

    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:
    System.ServiceProcess.ServiceController, System.String
    You can pipe a service object or a service name to this cmdlet.

    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

    Points: 1,785
    Helping HandTeam Member
    Rank: Community Hero

    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

    Points: 47
    Rank: Member

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

The topic ‘What is ByPropertyName, ByValue, SwitchParameter, Typename’ is closed to new replies.