Skip to content

Commit 01a248e

Browse files
authored
Create telssh.ps1
1 parent b07090e commit 01a248e

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

powershell/telssh.ps1

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
2+
ssh = @"
3+
4+
| | |
5+
__| _ \ | __| __| __ \
6+
| __/ | \__ \ \__ \ | | |
7+
\__| \___| _| ____/ ____/ _| |_|
8+
Github: https://github.com/schsoak
9+
BY: ~#M?x
10+
"@
11+
12+
if ($False){
13+
$SSHStatus = Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'
14+
}else {
15+
Write-Host "Installing OpenSSH..."
16+
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
17+
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
18+
Write-Host
19+
Clear-Host
20+
Write-Host "OpenSSH is installed" -ForegroundColor Red
21+
Start-Sleep 3 > $null
22+
}
23+
if ($true){
24+
$SSHStatus = Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'
25+
Start-Service sshd
26+
Set-Service -Name sshd -StartupType 'Automatic'
27+
Write-Host
28+
Write-Host
29+
Clear-Host
30+
else {
31+
Write-Host "Openssh is probably not available"
32+
}
33+
if ($false){
34+
$TelnetStatus = Get-WindowsCapability -Online | ? Name -like 'TelnetClient*'
35+
}else {
36+
Write-Host "Installing Telnet..."
37+
Add-WindowsCapability -Online -Name TelnetClient~~~~0.0.1.0
38+
Write-Host
39+
Clear-Host
40+
Write-Host "Telnet is already installed." -ForegroundColor Red
41+
}else {
42+
Write-Host "Have problems with Telnet"
43+
}

0 commit comments

Comments
 (0)