< Back
Get-SSHProbe
Post
NAME Get-SSHProbe
SYNOPSIS
Use ssh to determine OS information and the default shell for a Remote Host.
SYNTAX
Get-SSHProbe [-RemoteOSGuess <String>] -RemoteHostNameOrIP <String> -DomainUserName <String> [-DomainPasswordSS
<SecureString>] [-KeyFilePath <String>] [<CommonParameters>]
Get-SSHProbe [-RemoteOSGuess <String>] -RemoteHostNameOrIP <String> -LocalUserName <String> [-LocalPasswordSS
<SecureString>] [-KeyFilePath <String>] [<CommonParameters>]
DESCRIPTION
See SYNOPSIS
PARAMETERS
-RemoteOSGuess <String>
This parameter is OPTIONAL.
This parameter takes a string (either "Windows" or "Linux") that represents the type of platform you
anticipate the
Remote Host has. The default value for this parameter is "Windows".
IMPORTANT NOTE: If you specify "Linux" and it turns out that the Remote Host is running Windows, this function
will fail.
So, if you're not sure, leave the default value "Windows".
Required? false
Position? named
Default value Windows
Accept pipeline input? false
Accept wildcard characters? false
-RemoteHostNameOrIP <String>
This parameter is MANDATORY.
This parameter takes a string that represents the DNS-resolvable HostName/FQDN or IPv4 Address of the target
Remote Host
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-LocalUserName <String>
This parameter is MANDATORY for the Parameter Set 'Local'.
This parameter takes a string that represents the Local User Account on the Remote Host that you are using to
ssh into
the Remote Host. This string must be in format: <RemoteHostName>\\<UserName>
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-DomainUserName <String>
This parameter is MANDATORY for the Parameter Set 'Domain'.
This parameter takes a string that represents the Domain User Account on the Remote Host that you are using to
ssh into
the Remote Host. This string must be in format: <DomainShortName>\\<UserName>
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-LocalPasswordSS <SecureString>
This parameter is MANDATORY for the Parameter Set 'Local'.
This parameter takes a securestring that represents the password for the -LocalUserName you are using to ssh
into the
Remote Host.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-DomainPasswordSS <SecureString>
This parameter is MANDATORY for the Parameter Set 'Domain'.
This parameter takes a securestring that represents the password for the -DomainUserName you are using to ssh
into the
Remote Host.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-KeyFilePath <String>
This parameter is OPTIONAL.
This parameter takes a string that represents the full path to the Key File you are using to ssh into the
Remote Host.
Use this parameter instead of -LocalPasswordSS or -DomainPasswordSS.
Required? false
Position? named
Default value
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:\\># Minimal parameters...
$GetSSHProbeSplatParams = @{
RemoteHostNameOrIP = "zerowin16sshb"
DomainUserNameSS = "zero\\zeroadmin"
DomainPasswordSS = $(Read-Host -Prompt "Enter password" -AsSecureString)
}
Get-SSHProbe @GetSSHProbeSplatParams
-------------------------- EXAMPLE 2 --------------------------
PS C:\\># Using a local account on the Remote Host...
$GetSSHProbeSplatParams = @{
RemoteHostNameOrIP = "centos7nodomain"
LocalUserNameSS = "centos7nodomain\\vagrant"
LocalPasswordSS = $(Read-Host -Prompt "Enter password" -AsSecureString)
}
Get-SSHProbe @GetSSHProbeSplatParams
-------------------------- EXAMPLE 3 --------------------------
PS C:\\># Using an ssh Key File instead of a password...
$GetSSHProbeSplatParams = @{
RemoteHostNameOrIP = "centos7nodomain"
LocalUserNameSS = "centos7nodomain\\vagrant"
KeyFilePath = $HOME/.ssh/my_ssh_key
}
Get-SSHProbe @GetSSHProbeSplatParams
RELATED LINKS
SYNOPSIS
Use ssh to determine OS information and the default shell for a Remote Host.
SYNTAX
Get-SSHProbe [-RemoteOSGuess <String>] -RemoteHostNameOrIP <String> -DomainUserName <String> [-DomainPasswordSS
<SecureString>] [-KeyFilePath <String>] [<CommonParameters>]
Get-SSHProbe [-RemoteOSGuess <String>] -RemoteHostNameOrIP <String> -LocalUserName <String> [-LocalPasswordSS
<SecureString>] [-KeyFilePath <String>] [<CommonParameters>]
DESCRIPTION
See SYNOPSIS
PARAMETERS
-RemoteOSGuess <String>
This parameter is OPTIONAL.
This parameter takes a string (either "Windows" or "Linux") that represents the type of platform you
anticipate the
Remote Host has. The default value for this parameter is "Windows".
IMPORTANT NOTE: If you specify "Linux" and it turns out that the Remote Host is running Windows, this function
will fail.
So, if you're not sure, leave the default value "Windows".
Required? false
Position? named
Default value Windows
Accept pipeline input? false
Accept wildcard characters? false
-RemoteHostNameOrIP <String>
This parameter is MANDATORY.
This parameter takes a string that represents the DNS-resolvable HostName/FQDN or IPv4 Address of the target
Remote Host
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-LocalUserName <String>
This parameter is MANDATORY for the Parameter Set 'Local'.
This parameter takes a string that represents the Local User Account on the Remote Host that you are using to
ssh into
the Remote Host. This string must be in format: <RemoteHostName>\\<UserName>
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-DomainUserName <String>
This parameter is MANDATORY for the Parameter Set 'Domain'.
This parameter takes a string that represents the Domain User Account on the Remote Host that you are using to
ssh into
the Remote Host. This string must be in format: <DomainShortName>\\<UserName>
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-LocalPasswordSS <SecureString>
This parameter is MANDATORY for the Parameter Set 'Local'.
This parameter takes a securestring that represents the password for the -LocalUserName you are using to ssh
into the
Remote Host.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-DomainPasswordSS <SecureString>
This parameter is MANDATORY for the Parameter Set 'Domain'.
This parameter takes a securestring that represents the password for the -DomainUserName you are using to ssh
into the
Remote Host.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-KeyFilePath <String>
This parameter is OPTIONAL.
This parameter takes a string that represents the full path to the Key File you are using to ssh into the
Remote Host.
Use this parameter instead of -LocalPasswordSS or -DomainPasswordSS.
Required? false
Position? named
Default value
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:\\># Minimal parameters...
$GetSSHProbeSplatParams = @{
RemoteHostNameOrIP = "zerowin16sshb"
DomainUserNameSS = "zero\\zeroadmin"
DomainPasswordSS = $(Read-Host -Prompt "Enter password" -AsSecureString)
}
Get-SSHProbe @GetSSHProbeSplatParams
-------------------------- EXAMPLE 2 --------------------------
PS C:\\># Using a local account on the Remote Host...
$GetSSHProbeSplatParams = @{
RemoteHostNameOrIP = "centos7nodomain"
LocalUserNameSS = "centos7nodomain\\vagrant"
LocalPasswordSS = $(Read-Host -Prompt "Enter password" -AsSecureString)
}
Get-SSHProbe @GetSSHProbeSplatParams
-------------------------- EXAMPLE 3 --------------------------
PS C:\\># Using an ssh Key File instead of a password...
$GetSSHProbeSplatParams = @{
RemoteHostNameOrIP = "centos7nodomain"
LocalUserNameSS = "centos7nodomain\\vagrant"
KeyFilePath = $HOME/.ssh/my_ssh_key
}
Get-SSHProbe @GetSSHProbeSplatParams
RELATED LINKS