Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.10.318 #603

Merged
merged 20 commits into from
Nov 10, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added -Force parameter
  • Loading branch information
FriedrichWeinmann committed Nov 1, 2023
commit 0abe2a2192ec938f42b91dea8f5cbc5539040b6c
11 changes: 9 additions & 2 deletions PSFramework/functions/configuration/Select-PSFConfig.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@
- "LoggingProvider" would be depth 0
- "LogFile" would be depth 1
- ...

.PARAMETER Force
Also select hidden configuration items.
By default, only non-hidden settings are selected.

.EXAMPLE
PS C:\> Select-PSFConfig 'LoggingProvider.LogFile.*'
Expand All @@ -68,7 +72,10 @@
$FullName,

[int[]]
$Depth
$Depth,

[switch]
$Force
)

begin
Expand Down Expand Up @@ -110,7 +117,7 @@
}
process
{
$configItems = Get-PSFConfig -FullName $FullName
$configItems = Get-PSFConfig -FullName $FullName -Force:$Force
Group-Config -Config $configItems -Depth 0 | ForEach-Object {
if (-not $Depth) { return $_ }
if ($_._Depth -in $Depth) { $_ }
Expand Down