Skip to content

Commit

Permalink
Add "Install Telnet Client", closes Disassembler0#307
Browse files Browse the repository at this point in the history
  • Loading branch information
Disassembler0 committed May 13, 2020
1 parent a41cdbd commit b76ef02
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions Default.preset
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ DisableMediaSharing # EnableMediaSharing
# InstallHyperV # UninstallHyperV
# UninstallSSHClient # InstallSSHClient
# InstallSSHServer # UninstallSSHServer
# InstallTelnetClient # UninstallTelnetClient
# InstallNET23 # UninstallNET23
SetPhotoViewerAssociation # UnsetPhotoViewerAssociation
AddPhotoViewerOpenWith # RemovePhotoViewerOpenWith
Expand Down
20 changes: 20 additions & 0 deletions Win10.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -3468,6 +3468,26 @@ Function UninstallSSHServer {
Get-WindowsCapability -Online | Where-Object { $_.Name -like "OpenSSH.Server*" } | Remove-WindowsCapability -Online | Out-Null
}

# Install Telnet Client
Function InstallTelnetClient {
Write-Output "Installing Telnet Client..."
If ((Get-CimInstance -Class "Win32_OperatingSystem").ProductType -eq 1) {
Get-WindowsOptionalFeature -Online | Where-Object { $_.FeatureName -eq "TelnetClient" } | Enable-WindowsOptionalFeature -Online -NoRestart -WarningAction SilentlyContinue | Out-Null
} Else {
Install-WindowsFeature -Name "Telnet-Client" -WarningAction SilentlyContinue | Out-Null
}
}

# Uninstall Telnet Client
Function UninstallTelnetClient {
Write-Output "Uninstalling Telnet Client..."
If ((Get-CimInstance -Class "Win32_OperatingSystem").ProductType -eq 1) {
Get-WindowsOptionalFeature -Online | Where-Object { $_.FeatureName -eq "TelnetClient" } | Disable-WindowsOptionalFeature -Online -NoRestart -WarningAction SilentlyContinue | Out-Null
} Else {
Uninstall-WindowsFeature -Name "Telnet-Client" -WarningAction SilentlyContinue | Out-Null
}
}

# Install .NET Framework 2.0, 3.0 and 3.5 runtimes - Requires internet connection
Function InstallNET23 {
Write-Output "Installing .NET Framework 2.0, 3.0 and 3.5 runtimes..."
Expand Down

0 comments on commit b76ef02

Please sign in to comment.