-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #418 from gusztavvargadr/feature/update-for-2310-415
Update for 2310
- Loading branch information
Showing
5 changed files
with
77 additions
and
3 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
src/w101809eltsc/packer/builders/iso/floppy/Autounattend.ps1
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
Write-Host "Configure PowerShell" | ||
Set-ExecutionPolicy RemoteSigned -Force | ||
$ProgressPreference = 'SilentlyContinue' | ||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | ||
|
||
Write-Host "Install Chocolatey" | ||
$env:chocolateyVersion = '1.4.0' | ||
Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-WebRequest https://chocolatey.org/install.ps1 -UseBasicParsing | Invoke-Expression | ||
|
||
Write-Host "Install OpenSSH" | ||
netsh advfirewall firewall add rule name="OpenSSH-Install" dir=in localport=22 protocol=TCP action=block | ||
choco install openssh -y --version 8.0.0.1 -params '"/SSHServerFeature"' # /PathSpecsToProbeForShellEXEString:$env:windir\system32\windowspowershell\v1.0\powershell.exe"' | ||
net stop sshd | ||
netsh advfirewall firewall delete rule name="OpenSSH-Install" | ||
|
||
Write-Host "Configure OpenSSH" | ||
$sshd_config = "$($env:ProgramData)\ssh\sshd_config" | ||
(Get-Content $sshd_config).Replace("Match Group administrators", "# Match Group administrators") | Set-Content $sshd_config | ||
(Get-Content $sshd_config).Replace("AuthorizedKeysFile", "# AuthorizedKeysFile") | Set-Content $sshd_config | ||
net start sshd | ||
|
||
Write-Host "Install WinRM" | ||
netsh advfirewall firewall add rule name="WinRM-Install" dir=in localport=5985 protocol=TCP action=block | ||
Get-NetConnectionProfile | ForEach-Object { Set-NetConnectionProfile -InterfaceIndex $_.InterfaceIndex -NetworkCategory Private } | ||
winrm quickconfig -q | ||
winrm quickconfig -transport:http | ||
winrm set winrm/config '@{MaxTimeoutms="1800000"}' | ||
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="800"}' | ||
winrm set winrm/config/service '@{AllowUnencrypted="true"}' | ||
winrm set winrm/config/service/auth '@{Basic="true"}' | ||
winrm set winrm/config/client/auth '@{Basic="true"}' | ||
net stop winrm | ||
netsh advfirewall firewall delete rule name="WinRM-Install" | ||
|
||
Write-Host "Configure WinRM" | ||
netsh advfirewall firewall add rule name="WinRM-HTTP" dir=in localport=5985 protocol=TCP action=allow | ||
net start winrm |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"variables": { | ||
"iso_url_local": "{{user `download_directory`}}/Windows11_InsiderPreview_EnterpriseVL_x64_en-us_25951.iso", | ||
"iso_url_remote": "https://bit.ly/3rQNkTc", | ||
"iso_url_remote": "https://app.vagrantup.com/gusztavvargadr-iso/boxes/windows-11-insider-preview/versions/2202.0.2310/providers/iso-hosted/amd64/vagrant.box", | ||
"iso_checksum": "sha256:e771769bc27aec3361bae30ef86addc1f9934553270fea83a38f33d54475dc73" | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
Write-Host "Configure PowerShell" | ||
Set-ExecutionPolicy RemoteSigned -Force | ||
$ProgressPreference = 'SilentlyContinue' | ||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | ||
|
||
Write-Host "Install Chocolatey" | ||
$env:chocolateyVersion = '1.4.0' | ||
Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-WebRequest https://chocolatey.org/install.ps1 -UseBasicParsing | Invoke-Expression | ||
|
||
Write-Host "Install OpenSSH" | ||
netsh advfirewall firewall add rule name="OpenSSH-Install" dir=in localport=22 protocol=TCP action=block | ||
choco install openssh -y --version 8.0.0.1 -params '"/SSHServerFeature"' # /PathSpecsToProbeForShellEXEString:$env:windir\system32\windowspowershell\v1.0\powershell.exe"' | ||
net stop sshd | ||
netsh advfirewall firewall delete rule name="OpenSSH-Install" | ||
|
||
Write-Host "Configure OpenSSH" | ||
$sshd_config = "$($env:ProgramData)\ssh\sshd_config" | ||
(Get-Content $sshd_config).Replace("Match Group administrators", "# Match Group administrators") | Set-Content $sshd_config | ||
(Get-Content $sshd_config).Replace("AuthorizedKeysFile", "# AuthorizedKeysFile") | Set-Content $sshd_config | ||
net start sshd | ||
|
||
Write-Host "Install WinRM" | ||
netsh advfirewall firewall add rule name="WinRM-Install" dir=in localport=5985 protocol=TCP action=block | ||
Get-NetConnectionProfile | ForEach-Object { Set-NetConnectionProfile -InterfaceIndex $_.InterfaceIndex -NetworkCategory Private } | ||
winrm quickconfig -q | ||
winrm quickconfig -transport:http | ||
winrm set winrm/config '@{MaxTimeoutms="1800000"}' | ||
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="800"}' | ||
winrm set winrm/config/service '@{AllowUnencrypted="true"}' | ||
winrm set winrm/config/service/auth '@{Basic="true"}' | ||
winrm set winrm/config/client/auth '@{Basic="true"}' | ||
net stop winrm | ||
netsh advfirewall firewall delete rule name="WinRM-Install" | ||
|
||
Write-Host "Configure WinRM" | ||
netsh advfirewall firewall add rule name="WinRM-HTTP" dir=in localport=5985 protocol=TCP action=allow | ||
net start winrm |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"variables": { | ||
"iso_url_local": "{{user `download_directory`}}/Windows_InsiderPreview_Server_vNext_en-us_25967.iso", | ||
"iso_url_remote": "https://bit.ly/3RWqdB5", | ||
"iso_url_remote": "https://app.vagrantup.com/gusztavvargadr-iso/boxes/windows-server-insider-preview/versions/2102.0.2310/providers/iso-hosted/amd64/vagrant.box", | ||
"iso_checksum": "sha256:e20547ac8bcca26866b2882dcbee3616851a134b0387225bebabfb87bbf1b003" | ||
} | ||
} |