Open Liturgist opened 1 year ago
Make the Name parameter accept an array of names.
Add a -ListAvailable parameter that will produce and array of configuration variable names.
Add a -All switch that will produce an array of Name,Value objects for all configuration variables.
- If possible, I would like to implement this.
'OsName', 'OsOperatingSystemSKU', 'OSArchitecture', 'WindowsVersion', 'WindowsBuildLabEx', 'OsLanguage', 'OsMuiLanguages')
OsName : Microsoft Windows 10 Pro OsOperatingSystemSKU : 48 OsArchitecture : 64-bit WindowsVersion : 2009 WindowsBuildLabEx : 19041.1.amd64fre.vb_release.191206-1406 OsLanguage : en-US OsMuiLanguages : {en-US}
PS C:> [ordered]@{
'OSVersion' = ([System.Environment]::OSversion).VersionString 'Is 64-bit' = [System.Environment]::Is64BitOperatingSystem 'Current culture' = (Get-Culture).Name 'Current UI culture' = (Get-UICulture).Name 'PSVersion' = $PSVersionTable.PSVersion.ToString() 'PSEdition' = $PSVersionTable.PSEdition }
Name Value
OSVersion Microsoft Windows NT 10.0.19043.0 Is 64-bit True Current culture en-US Current UI culture en-US PSVersion 7.2.6 PSEdition Core
PS C:> $PSVersionTable
PSVersion 7.2.6 PSEdition Core GitCommitId 7.2.6 OS Microsoft Windows 10.0.19043 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0
PS C:> @(
"Running: $((Get-Module -Name PowerShellForGitHub) | Select-Object -ExpandProperty Version)", "Installed: $((Get-Module -Name PowerShellForGitHub -ListAvailable) | Select-Object -ExpandProperty Version)" ) -join [Environment]::NewLine Running: 0.16.1 Installed: 0.16.1
"Running: $((Get-Module -Name PowerShellForGitHub) | Select-Object -ExpandProperty Version)", "Installed: $((Get-Module -Name PowerShellForGitHub -ListAvailable) | Select-Object -ExpandProperty Version)" ) -join [Environment]::NewLine
Running: 0.16.1 Installed: 0.16.1
That sounds like a great idea, @Liturgist -- go for it! Thanks for the suggestion and offer for help.
Feature Idea Summary
Make the Name parameter accept an array of names.
Add a -ListAvailable parameter that will produce and array of configuration variable names.
Add a -All switch that will produce an array of Name,Value objects for all configuration variables.
Feature Idea Additional Details
Requested Assignment
Operating SystemPS C:> Get-ComputerInfo -Property @(
OsName : Microsoft Windows 10 Pro OsOperatingSystemSKU : 48 OsArchitecture : 64-bit WindowsVersion : 2009 WindowsBuildLabEx : 19041.1.amd64fre.vb_release.191206-1406 OsLanguage : en-US OsMuiLanguages : {en-US}
PS C:> [ordered]@{
Name Value
OSVersion Microsoft Windows NT 10.0.19043.0 Is 64-bit True Current culture en-US Current UI culture en-US PSVersion 7.2.6 PSEdition Core
PowerShell Version
PS C:> $PSVersionTable
Name Value
PSVersion 7.2.6 PSEdition Core GitCommitId 7.2.6 OS Microsoft Windows 10.0.19043 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0
Module Version
PS C:> @(