< Back

Close-PodeDisposable

Sat Jan 18, 2020 7:14 pm

NAME Close-PodeDisposable



SYNOPSIS

Dispose and close streams, tokens, and other Disposables.





SYNTAX

Close-PodeDisposable [[-Disposable] <IDisposable>] [-Close] [-CheckNetwork] [<CommonParameters>]





DESCRIPTION

Dispose and close streams, tokens, and other Disposables.





PARAMETERS

-Disposable <IDisposable>

The Disposable object to dispose and close.



Required? false

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Close [<SwitchParameter>]

Should the Disposable also be closed, as well as disposed?



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-CheckNetwork [<SwitchParameter>]

If an error is thrown, check the reason - if it's network related ignore the error.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Close-PodeDisposable -Disposable $stream -Close















RELATED LINKS