Skip to content
This repository was archived by the owner on May 28, 2021. It is now read-only.

Commit b76ef02

Browse files
committed
Add "Install Telnet Client", closes #307
1 parent a41cdbd commit b76ef02

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

Default.preset

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ DisableMediaSharing # EnableMediaSharing
213213
# InstallHyperV # UninstallHyperV
214214
# UninstallSSHClient # InstallSSHClient
215215
# InstallSSHServer # UninstallSSHServer
216+
# InstallTelnetClient # UninstallTelnetClient
216217
# InstallNET23 # UninstallNET23
217218
SetPhotoViewerAssociation # UnsetPhotoViewerAssociation
218219
AddPhotoViewerOpenWith # RemovePhotoViewerOpenWith

Win10.psm1

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3468,6 +3468,26 @@ Function UninstallSSHServer {
34683468
Get-WindowsCapability -Online | Where-Object { $_.Name -like "OpenSSH.Server*" } | Remove-WindowsCapability -Online | Out-Null
34693469
}
34703470

3471+
# Install Telnet Client
3472+
Function InstallTelnetClient {
3473+
Write-Output "Installing Telnet Client..."
3474+
If ((Get-CimInstance -Class "Win32_OperatingSystem").ProductType -eq 1) {
3475+
Get-WindowsOptionalFeature -Online | Where-Object { $_.FeatureName -eq "TelnetClient" } | Enable-WindowsOptionalFeature -Online -NoRestart -WarningAction SilentlyContinue | Out-Null
3476+
} Else {
3477+
Install-WindowsFeature -Name "Telnet-Client" -WarningAction SilentlyContinue | Out-Null
3478+
}
3479+
}
3480+
3481+
# Uninstall Telnet Client
3482+
Function UninstallTelnetClient {
3483+
Write-Output "Uninstalling Telnet Client..."
3484+
If ((Get-CimInstance -Class "Win32_OperatingSystem").ProductType -eq 1) {
3485+
Get-WindowsOptionalFeature -Online | Where-Object { $_.FeatureName -eq "TelnetClient" } | Disable-WindowsOptionalFeature -Online -NoRestart -WarningAction SilentlyContinue | Out-Null
3486+
} Else {
3487+
Uninstall-WindowsFeature -Name "Telnet-Client" -WarningAction SilentlyContinue | Out-Null
3488+
}
3489+
}
3490+
34713491
# Install .NET Framework 2.0, 3.0 and 3.5 runtimes - Requires internet connection
34723492
Function InstallNET23 {
34733493
Write-Output "Installing .NET Framework 2.0, 3.0 and 3.5 runtimes..."

0 commit comments

Comments
 (0)