Last active
November 25, 2022 09:49
-
-
Save ibrezm1/44ae1d54ead7b7ba9663ed007d83f5bd to your computer and use it in GitHub Desktop.
Windows installation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo grub-reboot 2 && sudo reboot | |
sudo grub-set-default <num> | |
27 systemd-analyze | |
28 systemd-analyze blame | |
# Enable RDB from system properties | |
# Enable Lan from Turn off on windows features | |
Powershell Commands : | |
$LocalTempDir = $env:TEMP; $ChromeInstaller = "ChromeInstaller.exe"; (new-object System.Net.WebClient).DownloadFile('http://dl.google.com/chrome/install/375.126/chrome_installer.exe', "$LocalTempDir\$ChromeInstaller"); & "$LocalTempDir\$ChromeInstaller" /silent /install; $Process2Monitor = "ChromeInstaller"; Do { $ProcessesFound = Get-Process | ?{$Process2Monitor -contains $_.Name} | Select-Object -ExpandProperty Name; If ($ProcessesFound) { "Still running: $($ProcessesFound -join ', ')" | Write-Host; Start-Sleep -Seconds 2 } else { rm "$LocalTempDir\$ChromeInstaller" -ErrorAction SilentlyContinue -Verbose } } Until (!$ProcessesFound) | |
#IPv4 | |
netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol="icmpv4:8,any" dir=in action=allow | |
Enable-NetFirewallRule -DisplayGroup "Remote Desktop" | |
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name "fDenyTSConnections" -value 0 | |
$user = New-LocalUser -AccountNeverExpires:$true -Password ( ConvertTo-SecureString -AsPlainText -Force 'Test0test') -Name "Paul" -FullName "Paul" -Description "Local Administrator" | |
Add-LocalGroupMember -Group "Administrators" -Member $user | |
Add-LocalGroupMember -Group "Remote Desktop Users" -Member $user | |
# Install the OpenSSH Client | |
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0 | |
# Install the OpenSSH Server | |
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 | |
Start-Service sshd | |
# OPTIONAL but recommended: | |
Set-Service -Name sshd -StartupType 'Automatic' | |
# Confirm the Firewall rule is configured. It should be created automatically by setup. Run the following to verify | |
if (!(Get-NetFirewallRule -Name "OpenSSH-Server-In-TCP" -ErrorAction SilentlyContinue | Select-Object Name, Enabled)) { | |
Write-Output "Firewall Rule 'OpenSSH-Server-In-TCP' does not exist, creating it..." | |
New-NetFirewallRule -Name 'OpenSSH-Server-In-TCP' -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 | |
} else { | |
Write-Output "Firewall rule 'OpenSSH-Server-In-TCP' has been created and exists." | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment