none
How to retrieve full information RRS feed

  • Pergunta

  • Hello,

    Certainly very basic question but…. How can I retrieve and display full information of launched commands. Not easy to explain so look at the following example Screenshot :-)

    How can I "remove" the three dots and replace them with all the commands at the end of the column ExportedCommands ?

    Thanks in advance

    quarta-feira, 17 de julho de 2019 10:13

Respostas

  • Not sure f it will help or not but try below:

     Get-Module Microsoft.PowerShell.Management | Select ModuleType, Version, Name, @{n="ExportedCommands"; e = { [string]$_.ExportedCommands.keys }} | ft -Wrap


    • Editado DumbleD0re quarta-feira, 17 de julho de 2019 13:00
    • Marcado como Resposta Thierry BRUNI quarta-feira, 17 de julho de 2019 13:06
    quarta-feira, 17 de julho de 2019 12:53

Todas as Respostas

  • Hi Thierry,

    I'm Thinking you don't use the appropriate cmdlet. Choose this one :

    Get-Command -Module Microsoft.PowerShell.Management

    It returns all cmdlets of the module.

    you can also search like this :

    Get-Command -Name get-* Get-Command -Verb get Get-Command -Noun *WMI

    Regards

    Olivier

    quarta-feira, 17 de julho de 2019 11:05
  • Get-Module Microsoft.PowerShell.Management | Format-List

    This is why you need to take time to learn PowerShell instead of guessing how to use it.  The answer is something you would have learned in the first couple of chapters of any good book on PowerShell.

    To get rid of the dots make your console wider.  The output will not fit on your window so PS adds dots to show you it has cut off some of the output.

    If you just want the commands you can use "Get-Comamnd" or just ex[and the results.

    Get-Module Microsoft.PowerShell.Management | Select -Expand ExportedCommands


    \_(ツ)_/


    • Editado jrv quarta-feira, 17 de julho de 2019 11:11
    • Sugerido como Resposta DumbleD0re quarta-feira, 17 de julho de 2019 11:24
    quarta-feira, 17 de julho de 2019 11:10
  • Hello Olivier,

    Thanks for your answer. You provided me an other way to display this information and I am thankful for this, but what I am looking for is really to "expand" the line and have the same display of information.

    quarta-feira, 17 de julho de 2019 12:16
  • Hello Dumbledore,

    Thanks for your answer. As you can see on the Following Screenshot my console is wider than the displayed result.

    The commandlet Select-Object with the Expand property only show me the the Exportedcommands column in a column display. But I will dig in with this hint.

    quarta-feira, 17 de julho de 2019 12:38
  • Not sure f it will help or not but try below:

     Get-Module Microsoft.PowerShell.Management | Select ModuleType, Version, Name, @{n="ExportedCommands"; e = { [string]$_.ExportedCommands.keys }} | ft -Wrap


    • Editado DumbleD0re quarta-feira, 17 de julho de 2019 13:00
    • Marcado como Resposta Thierry BRUNI quarta-feira, 17 de julho de 2019 13:06
    quarta-feira, 17 de julho de 2019 12:53
  • Hey Dumbledore,

    Yes it helps a lot. It is exactly what I was struggling to achieve.  (expect the "MouleType"  ;-)  )

    Thanks a lot

    quarta-feira, 17 de julho de 2019 13:06