how to find list of parameters in powershell

Welcome Forums General PowerShell Q&A how to find list of parameters in powershell

Viewing 11 reply threads
  • Author
    Posts
    • #230914
      Participant
      Topics: 1
      Replies: 7
      Points: 15
      Rank: Member

      For each cmdlet it having parametersets. how to find all parameters in powershell.

    • #230917
      Moderator
      Topics: 3
      Replies: 223
      Points: 1,221
      Helping Hand
      Rank: Community Hero
      Get-Command Get-ChildItem | % Parameters
      
      Get-Command Get-ChildItem | % ParameterSets
      • This reply was modified 1 month, 1 week ago by Kiran.
    • #230926
      Participant
      Topics: 1
      Replies: 7
      Points: 15
      Rank: Member

      Get-Command Get-ChildItem | % ParameterSets
      With this we can get all parameters for  Get-ChildItem. I want all parameters which we used in powershell.

    • #230953
      js
      Participant
      Topics: 30
      Replies: 828
      Points: 2,556
      Helping Hand
      Rank: Community Hero
      set-psreadlineoption -editmode emacs
      
      command - # and press tab
      • This reply was modified 1 month, 1 week ago by js.
    • #230965
      Participant
      Topics: 1
      Replies: 7
      Points: 15
      Rank: Member

      it is not working

    • #230983
      Moderator
      Topics: 3
      Replies: 223
      Points: 1,221
      Helping Hand
      Rank: Community Hero

      Did you try this one…

      Get-Command Get-ChildItem | % Parameters
    • #231016
      Participant
      Topics: 1
      Replies: 7
      Points: 15
      Rank: Member

      yes, I tried the both cmdlets you provided. i am getting parameter list for Get-ChildItem only. i need complete list of parameter which are used in powershell
      Ex:
      get-event log has its own parameters
      get-service has its own parameters

      get-command has its own parameters

      get-disk has its own parameters
      like this i want to get all parameters used for powershell.

    • #231022
      js
      Participant
      Topics: 30
      Replies: 828
      Points: 2,556
      Helping Hand
      Rank: Community Hero

      I’m pressing tab right after the dash. By default it would just cycle through each parameter one at a time. All the parameters appear above it. This does change the behavior of ctrl+v though.

      PS /Users/js> set-psreadlineoption -editmode emacs    
      PS /Users/js> get-childitem -                
      Path                 Depth                File                 ErrorAction          OutVariable          
      LiteralPath          Force                Hidden               WarningAction        OutBuffer            
      Filter               Name                 ReadOnly             InformationAction    PipelineVariable     
      Include              Attributes           System               ErrorVariable        
      Exclude              FollowSymlink        Verbose              WarningVariable      
      Recurse              Directory            Debug                InformationVariable  
      PS /Users/js> get-childitem -
      • This reply was modified 1 month, 1 week ago by js.
      • This reply was modified 1 month, 1 week ago by js.
      • This reply was modified 1 month, 1 week ago by js.
      • This reply was modified 1 month, 1 week ago by js.
      • This reply was modified 1 month, 1 week ago by js.
    • #231064
      Participant
      Topics: 1
      Replies: 7
      Points: 15
      Rank: Member

      for this i am getting parameters list for get-childitem . i need to get all parameters for all cmdlets in powershell.

      i need the all the list of  parameters used in powershell .

    • #231067
      Participant
      Topics: 24
      Replies: 175
      Points: 587
      Helping Hand
      Rank: Major Contributor
      Not sure why you would want a list of parameters available, as this will change all the time as you import modules, call your own scripts/functions.
      this will output the available parameters, but will throw quite a few errors for the cmdlets without a parameter set
      
      
      $commands = get-command
      foreach ($command in $commands)
      {
          write-host $command
          get-command |select -ExpandProperty parameters
      }

       

    • #231136
      js
      Participant
      Topics: 30
      Replies: 828
      Points: 2,556
      Helping Hand
      Rank: Community Hero

      Your question asking skills could use improvement.

    • #231469
      Participant
      Topics: 1
      Replies: 7
      Points: 15
      Rank: Member

      Thanks

Viewing 11 reply threads
  • You must be logged in to reply to this topic.