Use PodeStream - mdaneri/Pode GitHub Wiki
external help file: Pode-help.xml Module Name: Pode online version: PodeType: Utilities schema: 2.0.0
Like the "using" keyword in .NET. Allows you to use a Stream and then disposes of it.
Use-PodeStream [-Stream] <IDisposable> [-ScriptBlock] <ScriptBlock> [-ProgressAction <ActionPreference>]
[<CommonParameters>]
Like the "using" keyword in .NET. Allows you to use a Stream and then disposes of it.
$content = (Use-PodeStream -Stream $stream -ScriptBlock { return $args[0].ReadToEnd() })
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe ScriptBlock to invoke. It will be supplied the Stream.
Type: ScriptBlock
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe Stream to use and then dispose.
Type: IDisposable
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.