Telssh
Pre-release | | |
__| _ \ | __| __| __ \
| __/ | \__ \ \__ \ | | |
\__| \___| _| ____/ ____/ _| |_|
Github: https://github.com/schsoak
BY: ~#M?x
Code
ssh = @"
| | |
__| _ \ | __| __| __ \
| __/ | \__ \ \__ \ | | |
\__| \___| _| ____/ ____/ _| |_|
Github: https://github.com/schsoak
BY: ~#M?x
"@
if ($False){
$SSHStatus = Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'
}else {
Write-Host "Installing OpenSSH..."
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
Write-Host
Clear-Host
Write-Host "OpenSSH is installed" -ForegroundColor Red
Start-Sleep 3 > $null
}
if ($true){
$SSHStatus = Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'
Start-Service sshd
Set-Service -Name sshd -StartupType 'Automatic'
Write-Host
Write-Host
Clear-Host
else {
Write-Host "Openssh is probably not available"
}
if ($false){
$TelnetStatus = Get-WindowsCapability -Online | ? Name -like 'TelnetClient*'
}else {
Write-Host "Installing Telnet..."
Add-WindowsCapability -Online -Name TelnetClient~~~~0.0.1.0
Write-Host
Clear-Host
Write-Host "Telnet is already installed." -ForegroundColor Red
}
Details
The script checks if OpenSSH and Telnet are installed on the Windows system and performs the installation if necessary.
For OpenSSH:
If the $False variable is true, the script checks if OpenSSH is already installed and stores the status in $SSHStatus.
Otherwise, the script installs OpenSSH using the Add-WindowsCapability command and displays informative messages during the process.
After the installation of OpenSSH, the script checks if the $True variable is true and performs the following actions:
Checks again if OpenSSH is installed and updates $SSHStatus.
Starts the sshd service using the Start-Service command.
Sets the startup type of the sshd service to 'Automatic' using the Set-Service command.
Clears the screen and displays empty messages.
If the $True variable is false, the script displays a message stating that OpenSSH is not available.
For Telnet:
If the $False variable is true, the script checks if Telnet is already installed and stores the status in $TelnetStatus.
Otherwise, the script installs Telnet using the Add-WindowsCapability command and displays informative messages during the process.
If the $False variable is false, the script displays a message stating that there are problems with Telnet.
The script uses PowerShell commands to perform the checks and installations, displaying informative messages during the process.
The Documentation
The script verifies that OpenSSH and Telnet are installed on the Windows system and performs the installation if necessary.
Doc | Links |
---|---|
Telssh | https://github.com/suchsoak/Powershell_script/blob/main/Doc/Telssh.md |