Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Alexandru Croitor
minicoin
Commits
20bb12e9
Commit
20bb12e9
authored
Mar 12, 2022
by
Volker Hilsheimer
Browse files
Improvements to Windows basebox provisioning scripts
parent
92ee9360
Changes
3
Hide whitespace changes
Inline
Side-by-side
basebox/windows/openssh.ps1
View file @
20bb12e9
...
...
@@ -12,5 +12,7 @@ Set-Service ssh-agent -StartupType Automatic
Start-Service
sshd
Start-Service
ssh-agent
mkdir
$
env
:
userprofile
\.ssh
curl
-o
$
env
:
userprofile
\.ssh\authorized_keys
https://raw.githubusercontent.com/hashicorp/vagrant/master/keys/vagrant.pub
# put the public insecure vagrant key into C:\ProgramData\ssh\administrators_authorized_keys
icacls.exe
"C:\ProgramData\ssh\administrators_authorized_keys"
/inheritance:r
/grant
"Administrators:F"
/grant
"SYSTEM:F"
#
icacls.exe "C:\ProgramData\ssh\administrators_authorized_keys" /inheritance:r /grant "Administrators:F" /grant "SYSTEM:F"
basebox/windows/powershell.ps1
View file @
20bb12e9
$package
=
"PowerShell-7.1.1-win-x64.msi"
$version
=
"7.2.1"
$package
=
"PowerShell-
${version}
-win-x64.msi"
if
(
!
(
Test-Path
"C:\Program Files\PowerShell\7"
))
{
[
System.Net.ServicePointManager
]::
SecurityProtocol
=
[
System.Net.ServicePointManager
]::
SecurityProtocol
-bor
3072
(
new-object
net.webclient
)
.
DownloadFile
(
"https://github.com/PowerShell/PowerShell/releases/download/v7.1.1/
${package}
"
,
"
${package}
"
)
curl
-o
${package}
"https://github.com/PowerShell/PowerShell/releases/download/v
${version}
/
${package}
"
&
.
\
${package}
/quiet
ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL
=
1
ENABLE_PSREMOTING
=
1
REGISTER_MANIFEST
=
1
Write-Host
"Waiting for installation of PowerShell
7.1.1
"
Write-Host
"Waiting for installation of PowerShell
${version}
"
while
(
!
(
Test-Path
"C:\Program Files\PowerShell\7"
))
{
Write-Host
"."
Start-Sleep
-Seconds
5
}
Remove-Item
"PowerShell-7.1.1-win-x64.msi"
Remove-Item
$package
}
basebox/windows/provision.ps1
View file @
20bb12e9
...
...
@@ -46,7 +46,7 @@ if (!(Test-Path $ChocoInstallPath)) {
cd
$ChocoInstallPath
$packages
=
(
"pstools"
)
$packages
=
(
"pstools"
,
"sdelete"
)
.
\chocolatey
feature
enable
-n
=
allowGlobalConfirmation
ForEach
(
$p
in
$packages
)
{
.
\choco
install
--no-progress
-y
$p
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment