mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
* [StepSecurity] Apply security best practices Signed-off-by: StepSecurity Bot <bot@stepsecurity.io> * Update dependabot.yml * Delete tools/releaseBuild/Images/microsoft_powershell_centos7 directory * Delete tools/releaseBuild/Images/microsoft_powershell_ubuntu16.04 directory * Delete tools/releaseBuild/Images/microsoft_powershell_ubuntu18.04 directory * Delete tools/releaseBuild/Images/microsoft_powershell_windowsservercore/Dockerfile --------- Signed-off-by: StepSecurity Bot <bot@stepsecurity.io> Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
25 lines
1.2 KiB
Docker
25 lines
1.2 KiB
Docker
# escape=`
|
|
FROM mcr.microsoft.com/windows/servercore:ltsc2022@sha256:5d09ffa90d91a46e2fe7652b0a37cbf5217f34a819c3d71cbe635dae8226061b
|
|
|
|
SHELL ["pwsh.exe","-command"]
|
|
|
|
# the source msi should change on a daily basis
|
|
# the destination should not change
|
|
ADD PSCore.msi /PSCore.msi
|
|
|
|
# the msipath (PSCore.msi) below will need to change based on the daily package
|
|
# set up for basic auth
|
|
# install-powershellremoting will restart winrm service
|
|
RUN new-LocalUser -Name testuser -password (ConvertTo-SecureString 11aa!!AA -asplaintext -force); `
|
|
add-localgroupmember -group administrators -member testuser; `
|
|
set-item wsman:/localhost/service/auth/basic $true; `
|
|
set-item WSMan:/localhost/client/trustedhosts "*" -force; `
|
|
set-item wsman:/localhost/service/AllowUnencrypted $true; `
|
|
set-item WSMan:/localhost/client/AllowUnencrypted $true; `
|
|
Start-Process -FilePath msiexec.exe -ArgumentList '-qn', `
|
|
'-i c:\PSCore.msi','-log c:\PSCore-install.log','-norestart' -wait ; `
|
|
$psexec = get-item -path ${ENV:ProgramFiles}/powershell/*/pwsh.exe; `
|
|
$corehome = $psexec.directory.fullname; `
|
|
& $psexec Install-PowerShellRemoting.ps1; `
|
|
remove-item -force c:\PSCore.msi
|