@@ -82,8 +82,8 @@ $shortModuleInfos = Get-ChildItem -Path $builtinModulePath `
8282 $module = $_
8383 Write-Progress $module.Name
8484 $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 ()}}
8787 Add-Member - InputObject $shortModuleInfo - NotePropertyName ' ExportedCommands' - NotePropertyValue $shortCommands
8888 Add-Member - InputObject $shortModuleInfo - NotePropertyName ' ExportedAliases' - NotePropertyValue $module.ExportedAliases.Keys - PassThru
8989 }
@@ -95,12 +95,12 @@ $shortModuleInfos = Get-ChildItem -Path $builtinModulePath `
9595$psCoreSnapinName = ' Microsoft.PowerShell.Core'
9696Write-Progress $psCoreSnapinName
9797$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
9999$shortModuleInfo = New-Object - TypeName PSObject - Property @ {Name = $psCoreSnapinName ; Version = $commands [0 ].PSSnapin.PSVersion.ToString()}
100100Add-Member - InputObject $shortModuleInfo - NotePropertyName ' ExportedCommands' - NotePropertyValue $shortCommands
101101
102102# 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 }
104104if ($null -eq $aliases ) {
105105 $aliases = @ ()
106106}
0 commit comments