Get-Command – additional parametr

Welcome Forums General PowerShell Q&A Get-Command – additional parametr

Viewing 4 reply threads
  • Author
    Posts
    • #231268
      Participant
      Topics: 3
      Replies: 3
      Points: 33
      Rank: Member

      Hello

      I am looking for command or additional parameters to get-command.

      For examples I know that on of results of this command is  ‘Uptime’  or ‘State’ (but I don’t rember a cmdlets – in this case [get-vm])

      How to find cmdlets when I know only one of results and this results don’t occurs as parameters ?

       

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

      I doubt we can find CmdLets based on the resultant property names or values, but if you want to find the CmdLets based on the parameter name, then you can use the command below…

      Get-Command -ParameterName ComputerName

      or if I understood your question, can you please rephrase your question for me.

      Thank you.

    • #231295
      Participant
      Topics: 3
      Replies: 3
      Points: 33
      Rank: Member

      Excatly, I mind about first part of Your post. Sometimes we rember only  the resultant property names or values…

    • #231340
      Participant
      Topics: 5
      Replies: 323
      Points: 473
      Helping Hand
      Rank: Contributor

      Either line below will show you what parameters are available for the Get-VM cmdlet.

      Get-Command Get-VM -Syntax
      Get-Help get-vm -Parameter *
      
    • #231433
      js
      Participant
      Topics: 30
      Replies: 828
      Points: 2,556
      Helping Hand
      Rank: Community Hero

      I like using -noun or -verb:

      gcm -noun childitem  # the only one!
      gcm -verb get        # 58 of them
      • 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.
Viewing 4 reply threads
  • You must be logged in to reply to this topic.