OP 帖子中的问题是,默认情况下,PowerShell 仅显示此类型重复组中的前 N 个值。因此,对于导出的命令,您只能看到前 4 个(默认为 4 个)。要改变这一点,只需为变量 $FormatEnumerationLimit 设置一个更高的值。并且根据 Format-Table 的能力,您可能还需要在指向 FT 的显式管道上指定 -wrap,如下所示:
PSH [C:\foo]: $FormatEnumerationLimit = 99
PSH [C:\foo]: get-module -ListAvailable | ft -wrap
Directory: C:\Users\tfl.COOKHAM\Documents\WindowsPowerShell\Modules
ModuleType Name ExportedCommands
---------- ---- ----------------
Manifest Audit
Script authenticode {New-PoshCode, Get-PoshCode, Get-PoshCodeUpgrade, Get-WebFile, Set-DownloadFlag,
Remove-DownloadFlag, Get-DownloadFlag, Test-DownloadFlag, block, unblock,
Search-PoshCode}
Script DotNet {Get-Type, Get-ProgID, Get-CommandWithParameterType}
Manifest DTW.PS.FIleSystem Get-DTWFileEncoding
Manifest DTW.PS.PrettyPrinterV1 Get-DTWFileEncoding
Script EZOut {Add-FormatData, Clear-FormatData, Remove-FormatData, Out-FormatData,
Show-CustomAction, Write-FormatView, Write-CustomAction, Write-FormatTableView,
Get-FormatFile, Find-FormatView, Get-PropertySet, Add-TypeData, Clear-TypeData,
Remove-TypeData, Out-TypeData, Write-TypeView}
Script FileSystem {Copy-ToZip, Get-DuplicateFile, Get-FreeDiskSpace, Get-SHA1, New-Zip,
Mount-SpecialFolder, Rename-Drive, Resolve-ShortcutFile, Start-FileSystemWatcher}
Manifest FileTransfer {Add-BitsFile, Remove-BitsTransfer, Complete-BitsTransfer, Get-BitsTransfer,
Start-BitsTransfer, Resume-BitsTransfer, Set-BitsTransfer, Suspend-BitsTransfer}
Manifest hyperv {Add-ZIPContent, ConvertTo-Enum, Copy-ZipContent, Get-ZIPContent, Select-Item,
Select-List, Select-EnumType, Out-Tree, Select-Tree, Test-Admin,
Convert-DiskIDtoDrive, Get-FirstAvailableDriveLetter, New-Zip, Test-WMIJob,
Test-WMIResult}
Script IsePack {Add-ForeachStatement, Add-IfStatement, Add-InlineHelp, Add-IseMenu,
Add-Parameter, Add-PInvoke, Add-SwitchStatement, Close-AllOpenedFiles,
ConvertTo-ShortcutKeyTable, Copy-Colored, Copy-ColoredHTML, Export-FormatView,
Get-CurrentOpenedFileToken, Get-CurrentToken, Get-FunctionFromFile,
Get-TokenFromFile, Invoke-Line, Move-ToLastGroup, Move-ToLastPowerShellTab,
Move-ToNextGroup, Move-ToNextPowerShellTab, New-IseScript,
New-ScriptModuleFromCurrentLocation, Push-CurrentFileLocation,
Save-IseFileWithAutoName, Select-AllInFile, Select-CurrentText,
Select-CurrentTextAsCommand, Select-CurrentTextAsType,
Select-CurrentTextAsVariable, Show-HelpForCurrentSelection, Show-Member,
Show-SyntaxForCurrentCommand, Show-TypeConstructor,
Show-TypeConstructorForCurrentType, Split-IseFile, Switch-CommentOrText,
Switch-SelectedCommentOrText, Write-ColorizedHTML}
...为简洁起见截断**