Write-FunctionHeaderOrFooter
SYNOPSISโ
Write the function header or footer to the log upon first entering or exiting a function.
SYNTAXโ
Headerโ
Write-FunctionHeaderOrFooter -CmdletName <String> -CmdletBoundParameters <Hashtable> [-Header]
[<CommonParameters>]
Footerโ
Write-FunctionHeaderOrFooter -CmdletName <String> [-Footer] [<CommonParameters>]
DESCRIPTIONโ
Write the "Function Start" message, the bound parameters the function was invoked with, or the "Function End" message when entering or exiting a function.
Messages are debug messages so will only be logged if LogDebugMessage option is enabled in XML config file.
EXAMPLESโ
EXAMPLE 1โ
Write-FunctionHeaderOrFooter -CmdletName ${CmdletName} -CmdletBoundParameters $PSBoundParameters -Header
EXAMPLE 2โ
Write-FunctionHeaderOrFooter -CmdletName ${CmdletName} -Footer
PARAMETERSโ
-CmdletNameโ
The name of the function this function is invoked from.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-CmdletBoundParametersโ
The bound parameters of the function this function is invoked from.
Type: Hashtable
Parameter Sets: Header
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Headerโ
Write the function header.
Type: SwitchParameter
Parameter Sets: Header
Aliases:
Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-Footerโ
Write the function footer.
Type: SwitchParameter
Parameter Sets: Footer
Aliases:
Required: True
Position: Named
Default value: False
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.
INPUTSโ
Noneโ
You cannot pipe objects to this function.โ
OUTPUTSโ
Noneโ
This function does not generate any output.โ
NOTESโ
This is an internal script function and should typically not be called directly.