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

    2019年7月17日 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


    2019年7月17日 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

    2019年7月17日 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 2019年7月17日 11:11
    • 回答の候補に設定 DumbleD0re 2019年7月17日 11:24
    2019年7月17日 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.

    2019年7月17日 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.

    2019年7月17日 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


    2019年7月17日 12:53
  • Hey Dumbledore,

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

    Thanks a lot

    2019年7月17日 13:06