@@ -82,8 +82,8 @@ $shortModuleInfos = Get-ChildItem -Path $builtinModulePath `
82
82
$module = $_
83
83
Write-Progress $module.Name
84
84
$commands = Get-Command - Module $module
85
- $shortCommands = $commands | select - Property Name, @ {Label = ' CommandType' ;Expression = {$_.CommandType.ToString ()}}, ParameterSets
86
- $shortModuleInfo = $module | select - Property Name, @ {Label = ' Version' ;Expression = {$_.Version.ToString ()}}
85
+ $shortCommands = $commands | Select-Object - Property Name, @ {Label = ' CommandType' ;Expression = {$_.CommandType.ToString ()}}, ParameterSets
86
+ $shortModuleInfo = $module | Select-Object - Property Name, @ {Label = ' Version' ;Expression = {$_.Version.ToString ()}}
87
87
Add-Member - InputObject $shortModuleInfo - NotePropertyName ' ExportedCommands' - NotePropertyValue $shortCommands
88
88
Add-Member - InputObject $shortModuleInfo - NotePropertyName ' ExportedAliases' - NotePropertyValue $module.ExportedAliases.Keys - PassThru
89
89
}
@@ -95,12 +95,12 @@ $shortModuleInfos = Get-ChildItem -Path $builtinModulePath `
95
95
$psCoreSnapinName = ' Microsoft.PowerShell.Core'
96
96
Write-Progress $psCoreSnapinName
97
97
$commands = Get-Command - Module $psCoreSnapinName
98
- $shortCommands = $commands | select - Property Name, @ {Label = ' CommandType' ;Expression = {$_.CommandType.ToString ()}}, ParameterSets
98
+ $shortCommands = $commands | Select-Object - Property Name, @ {Label = ' CommandType' ;Expression = {$_.CommandType.ToString ()}}, ParameterSets
99
99
$shortModuleInfo = New-Object - TypeName PSObject - Property @ {Name = $psCoreSnapinName ; Version = $commands [0 ].PSSnapin.PSVersion.ToString()}
100
100
Add-Member - InputObject $shortModuleInfo - NotePropertyName ' ExportedCommands' - NotePropertyValue $shortCommands
101
101
102
102
# Find the exported aliases for the commands in Microsoft.PowerShell.Core
103
- $aliases = Get-Alias * | where { ($commands ).Name -contains $_.ResolvedCommandName }
103
+ $aliases = Get-Alias * | Where-Object { ($commands ).Name -contains $_.ResolvedCommandName }
104
104
if ($null -eq $aliases ) {
105
105
$aliases = @ ()
106
106
}
0 commit comments