Skip to content

Commit

Permalink
help update
Browse files Browse the repository at this point in the history
  • Loading branch information
FriedrichWeinmann committed Jul 5, 2024
1 parent c3e2fef commit b946339
Show file tree
Hide file tree
Showing 10 changed files with 1,839 additions and 662 deletions.
2,275 changes: 1,632 additions & 643 deletions PSFramework/en-us/PSFramework.dll-Help.xml

Large diffs are not rendered by default.

37 changes: 36 additions & 1 deletion help/en-us/ConvertTo-PSFHashtable.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ Converts an object into a hashtable.
```
ConvertTo-PSFHashtable [-Include <String[]>] [-Exclude <String[]>] [-CaseSensitive] [-IncludeEmpty] [-Inherit]
[-Remap <Hashtable>] [-InputObject <PSObject[]>] [-ReferenceCommand <String>]
[-ReferenceParameterSetName <String>] [<CommonParameters>]
[-ReferenceParameterSetName <String>] [-AsPsfHashtable] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
```

## DESCRIPTION
Expand All @@ -36,6 +37,8 @@ Get-ChildItem | ConvertTo-PSFHashtable

Scans all items in the current path and converts those objects into hashtables.

_

### Example 2
```
$parameters = $PSBoundParameters | ConvertTo-PSFHashtable -Include ComputerName, Credential, Target -Inherit
Expand Down Expand Up @@ -129,6 +132,7 @@ Accept wildcard characters: False
### -CaseSensitive
Make Include and Exclude name-filtering case sensitive.
Will be ignored when also specifying the "AsPsfHashtable" parameter.
```yaml
Type: SwitchParameter
Expand All @@ -142,6 +146,37 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -AsPsfHashtable
The return object(s) will be of the special type "PsfHashtable", rather than a regular hashtable.
This will behave like a regular hashtable, but also supports defining a default value when resolving a key that has not been defined.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -ProgressAction
{{ Fill ProgressAction Description }}
```yaml
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -ReferenceCommand
Only include keys that map to the parameters of the specified command.
Expand Down
18 changes: 17 additions & 1 deletion help/en-us/Invoke-PSFCallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ Invokes all registered callback scripts applicable to the calling command.
## SYNTAX

```
Invoke-PSFCallback [-Data <Object>] [-EnableException <Boolean>] [-PSCmdlet <PSCmdlet>] [<CommonParameters>]
Invoke-PSFCallback [-Data <Object>] [-EnableException <Boolean>] [-PSCmdlet <PSCmdlet>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -111,6 +112,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -ProgressAction
{{ Fill ProgressAction Description }}
```yaml
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
Expand Down
46 changes: 44 additions & 2 deletions help/en-us/Invoke-PSFProtectedCommand.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Invoke-PSFProtectedCommand -ScriptBlock <ScriptBlock> -Action <String> [-Target
[-EnableException <Boolean>] [-PSCmdlet <PSCmdlet>] [-Continue] [-ContinueLabel <String>] [-Tag <String[]>]
[-RetryCount <Int32>] [-RetryWait <TimeSpanParameter>] [-RetryWaitEscalation <Double>]
[-RetryErrorType <String[]>] [-RetryCondition <ScriptBlock>] [-ErrorEvent <ScriptBlock>]
[-Level <MessageLevel>] [-WhatIf] [-Confirm] [<CommonParameters>]
[-Level <MessageLevel>] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

### String
Expand All @@ -27,7 +27,7 @@ Invoke-PSFProtectedCommand -ScriptBlock <ScriptBlock> -ActionString <String> [-A
[-Target <Object>] [-EnableException <Boolean>] [-PSCmdlet <PSCmdlet>] [-Continue] [-ContinueLabel <String>]
[-Tag <String[]>] [-RetryCount <Int32>] [-RetryWait <TimeSpanParameter>] [-RetryWaitEscalation <Double>]
[-RetryErrorType <String[]>] [-RetryCondition <ScriptBlock>] [-ErrorEvent <ScriptBlock>]
[-Level <MessageLevel>] [-WhatIf] [-Confirm] [<CommonParameters>]
[-Level <MessageLevel>] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

## DESCRIPTION
Expand All @@ -38,6 +38,8 @@ This command is designed to do away with the script code overhead of:
- Logging execution
As such it is intended to help produce more readable code in less time.

It also adds the ability to retry a failed action a specified number of times, at a static or escalating interval.

Note: This command can only be used from an advanced function unless specifying the -PSCmdlet parameter.

## EXAMPLES
Expand Down Expand Up @@ -65,6 +67,31 @@ PS C:\> if (Test-PSFFunctionInterrupt) { return }
Invokes the specified scriptblock, honoring ShouldProcess, logging execution and potential failure.
Failure will lead to a warning with the command terminating silently, unless the calling command's module opted into inheriting the '-EnableException' parameter (in which case the caller of the command calling Invoke-PSFProtectedCommand gets to pick whether this is throwing an exception or not)

_

### Example 3 : Try again
```powershell
Invoke-PSFProtectedCommand -Action Delete -Target $Path -ScriptBlock {
Remove-Item -Path $Path -Recurse -Force -Confirm:$false -ErrorAction Stop
} -PSCmdlet $PSCmdlet -EnableException $EnableException -Continue -RetryCount 3 -RetryWait 2s
```

Will try to delete the resource specified in $Path.
It will keep trying to do that every 2s until it failed four times (Once plus the specified 3 retries).

_

### Example 4 : Try again ... sometimes
```powershell
Invoke-PSFProtectedCommand -Action Delete -Target $Path -ScriptBlock {
Remove-Item -Path $Path -Recurse -Force -Confirm:$false -ErrorAction Stop
} -PSCmdlet $PSCmdlet -EnableException $EnableException -Continue -RetryCount 3 -RetryErrorType 'System.Management.Automation.ItemNotFoundException'
```

Will try to delete the resource specified in $Path.
It will keep trying to do that until it failed four times (Once plus the specified 3 retries).
Retries will only happen, if the error of the failure was of the type 'System.Management.Automation.ItemNotFoundException'.

## PARAMETERS

### -Action
Expand Down Expand Up @@ -356,6 +383,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -ProgressAction
{{ Fill ProgressAction Description }}
```yaml
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -RetryWaitEscalation
When retrying failed attempts, the previous wait time is multiplied by this value.
This allows waiting longer and longer periods, each time it failed.
Expand Down
17 changes: 16 additions & 1 deletion help/en-us/Remove-PSFNull.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Filters out null objects.

```
Remove-PSFNull [-InputObject <PSObject>] [-AllowEmptyCollections] [-AllowEmptyStrings] [-Enumerate]
[<CommonParameters>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -94,6 +94,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -ProgressAction
{{ Fill ProgressAction Description }}
```yaml
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
Expand Down
23 changes: 20 additions & 3 deletions help/en-us/Select-PSFObject.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ Select-PSFObject [-InputObject <PSObject>] [-Property <SelectParameter[]>] [-Exc
[-ExpandProperty <String>] [-Alias <SelectAliasParameter[]>]
[-ScriptProperty <SelectScriptPropertyParameter[]>] [-ScriptMethod <SelectScriptMethodParameter[]>] [-Unique]
[-Last <Int32>] [-First <Int32>] [-Skip <Int32>] [-Wait] [-ShowProperty <String[]>]
[-ShowExcludeProperty <String[]>] [-TypeName <String>] [-KeepInputObject] [<CommonParameters>]
[-ShowExcludeProperty <String[]>] [-TypeName <String>] [-KeepInputObject] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
```

### SkipLastParameter
Expand All @@ -27,13 +28,14 @@ Select-PSFObject [-InputObject <PSObject>] [-Property <SelectParameter[]>] [-Exc
[-ExpandProperty <String>] [-Alias <SelectAliasParameter[]>]
[-ScriptProperty <SelectScriptPropertyParameter[]>] [-ScriptMethod <SelectScriptMethodParameter[]>] [-Unique]
[-SkipLast <Int32>] [-ShowProperty <String[]>] [-ShowExcludeProperty <String[]>] [-TypeName <String>]
[-KeepInputObject] [<CommonParameters>]
[-KeepInputObject] [-ProgressAction <ActionPreference>] [<CommonParameters>]
```

### IndexParameter
```
Select-PSFObject [-InputObject <PSObject>] [-Unique] [-Wait] [-Index <Int32[]>] [-ShowProperty <String[]>]
[-ShowExcludeProperty <String[]>] [-TypeName <String>] [-KeepInputObject] [<CommonParameters>]
[-ShowExcludeProperty <String[]>] [-TypeName <String>] [-KeepInputObject] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -408,6 +410,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -ProgressAction
{{ Fill ProgressAction Description }}
```yaml
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
Expand Down
22 changes: 19 additions & 3 deletions help/en-us/Set-PSFConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,24 @@ Sets configuration entries.
```
Set-PSFConfig -FullName <String> [-Value <Object>] [-Description <String>] [-Validation <String>]
[-Handler <ScriptBlock>] [-Hidden] [-Default] [-Initialize] [-SimpleExport] [-ModuleExport] [-AllowDelete]
[-DisableValidation] [-DisableHandler] [-PassThru] [-EnableException] [<CommonParameters>]
[-DisableValidation] [-DisableHandler] [-PassThru] [-EnableException] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
```

### Persisted
```
Set-PSFConfig -FullName <String> -PersistedValue <String> [-PersistedType <ConfigurationValueType>]
[-Description <String>] [-Validation <String>] [-Handler <ScriptBlock>] [-Hidden] [-Default] [-Initialize]
[-SimpleExport] [-ModuleExport] [-AllowDelete] [-DisableValidation] [-DisableHandler] [-PassThru]
[-EnableException] [<CommonParameters>]
[-EnableException] [-ProgressAction <ActionPreference>] [<CommonParameters>]
```

### Module
```
Set-PSFConfig [-Module <String>] -Name <String> [-Value <Object>] [-Description <String>]
[-Validation <String>] [-Handler <ScriptBlock>] [-Hidden] [-Default] [-Initialize] [-SimpleExport]
[-ModuleExport] [-AllowDelete] [-DisableValidation] [-DisableHandler] [-PassThru] [-EnableException]
[<CommonParameters>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -413,6 +414,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -ProgressAction
{{ Fill ProgressAction Description }}
```yaml
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
Expand Down
23 changes: 20 additions & 3 deletions help/en-us/Set-PSFObjectOrder.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,21 @@ Wrapper around Sort-Object, unifying the parameter seruface between PS5 and PS7.
### Default (Default)
```
Set-PSFObjectOrder [-Stable] [-Descending] [-Unique] [-InputObject <PSObject>] [[-Property] <SortParameter[]>]
[-Culture <String>] [-CaseSensitive] [<CommonParameters>]
[-Culture <String>] [-CaseSensitive] [-ProgressAction <ActionPreference>] [<CommonParameters>]
```

### Top
```
Set-PSFObjectOrder [-Descending] [-Unique] -Top <Int32> [-InputObject <PSObject>]
[[-Property] <SortParameter[]>] [-Culture <String>] [-CaseSensitive] [<CommonParameters>]
[[-Property] <SortParameter[]>] [-Culture <String>] [-CaseSensitive] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
```

### Bottom
```
Set-PSFObjectOrder [-Descending] [-Unique] -Bottom <Int32> [-InputObject <PSObject>]
[[-Property] <SortParameter[]>] [-Culture <String>] [-CaseSensitive] [<CommonParameters>]
[[-Property] <SortParameter[]>] [-Culture <String>] [-CaseSensitive] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -190,6 +192,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -ProgressAction
{{ Fill ProgressAction Description }}

```yaml
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

Expand Down
21 changes: 18 additions & 3 deletions help/en-us/Test-PSFShouldProcess.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ Implements the shouldprocess question.

### Message (Default)
```
Test-PSFShouldProcess -Target <String> -Action <String> [-PSCmdlet <PSCmdlet>] [-WhatIf] [-Confirm]
[<CommonParameters>]
Test-PSFShouldProcess -Target <String> -Action <String> [-PSCmdlet <PSCmdlet>]
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

### String
```
Test-PSFShouldProcess -Target <String> -ActionString <String> [-ActionStringValues <Object[]>]
[-PSCmdlet <PSCmdlet>] [-WhatIf] [-Confirm] [<CommonParameters>]
[-PSCmdlet <PSCmdlet>] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -151,6 +151,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -ProgressAction
{{ Fill ProgressAction Description }}
```yaml
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
Expand Down
Loading

0 comments on commit b946339

Please sign in to comment.