none
How to retrieve full information RRS feed

  • Вопрос

  • 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

    17 июля 2019 г. 10:13

Ответы

  • 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


    • Изменено DumbleD0re 17 июля 2019 г. 13:00
    • Помечено в качестве ответа Thierry BRUNI 17 июля 2019 г. 13:06
    17 июля 2019 г. 12:53

Все ответы

  • 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

    17 июля 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


    \_(ツ)_/


    • Изменено jrv 17 июля 2019 г. 11:11
    • Предложено в качестве ответа DumbleD0re 17 июля 2019 г. 11:24
    17 июля 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.

    17 июля 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.

    17 июля 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


    • Изменено DumbleD0re 17 июля 2019 г. 13:00
    • Помечено в качестве ответа Thierry BRUNI 17 июля 2019 г. 13:06
    17 июля 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

    17 июля 2019 г. 13:06