< Back

Disconnect-From

Sun Jan 19, 2020 6:35 pm

NAME Disconnect-From



SYNOPSIS

Terminates a session established with Connect-To using a CredentialStoreItem.





SYNTAX

Disconnect-From [-RemoteHost] <String> [-Type] <String> [-Force] [<CommonParameters>]





DESCRIPTION

Terminates a session established with Connect-To using a CredentialStoreItem.





PARAMETERS

-RemoteHost <String>

Specify the remote endpoint, whose session you would like to terminate.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Type <String>

Specify the host type of the target. Currently implemented targets are: CiscoUcs, FTP, NetAppFAS, VMware,

CisServer, ExchangeHTTP, ExchangeHTTPS, SCP.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Force [<SwitchParameter>]

Force the disconnect, even if the disconnect would fail.



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

[None]





OUTPUTS

[None]





NOTES





- File Name : Disconnect-From.ps1

- Author : Marco Blessing - marco.blessing@googlemail.com

- Requires :



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



PS C:\\>Disconnect-From -RemoteHost "ucs.myside.local" -Type CiscoUcs













-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Disconnect-From -RemoteHost "ftp.myside.local" -Type FTP













-------------------------- EXAMPLE 3 --------------------------



PS C:\\>Disconnect-From -RemoteHost "fas.myside.local" -Type NetAppFAS













-------------------------- EXAMPLE 4 --------------------------



PS C:\\>Disconnect-From -RemoteHost "esx01.myside.local" -Type VMware













-------------------------- EXAMPLE 5 --------------------------



PS C:\\>Disconnect-From -RemoteHost "esx01.myside.local" -Type VMware -Force:$True













-------------------------- EXAMPLE 6 --------------------------



PS C:\\>Disconnect-From -RemoteHost "vcenter.myside.local" -Type CisServer













-------------------------- EXAMPLE 7 --------------------------



PS C:\\>Disconnect-From -RemoteHost "exchange01.myside.local" -Type ExchangeHTTP













-------------------------- EXAMPLE 8 --------------------------



PS C:\\>Disconnect-From -RemoteHost "exchange01.myside.local" -Type ExchangeHTTPS















RELATED LINKS

https://github.com/OCram85/PSCredentialStore