Compare commits
26 Commits
6435f5e823
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 4300cbfa53 | |||
| e22f17384b | |||
| 1d744181c0 | |||
| cb7bd116e3 | |||
| af4d813fd4 | |||
| 97a7e36cbd | |||
| 5ec540b655 | |||
| 9edf0897b6 | |||
| 615ba57532 | |||
| 3cc521e1c4 | |||
| 2f0dc84a56 | |||
| 5e047a1425 | |||
| a62c97be93 | |||
| 86ac65f758 | |||
| bb32504713 | |||
| 9ad206929b | |||
| e7a798c937 | |||
| add4cc4455 | |||
| 65cdeb8d5e | |||
| c35a04a807 | |||
| 096c42053c | |||
| 9055ccf635 | |||
| ca2f43e616 | |||
| 44557356a6 | |||
| 9da3b534a1 | |||
| 22f20d7c46 |
@ -1,3 +1,6 @@
|
||||
|
||||
Run InstallSSH.bat in an Administrator command prompt
|
||||
|
||||
1) Download zip of repo
|
||||
2) mkdir C:\wPublic
|
||||
3) Unpack wPublic to C:\wPublic
|
||||
4) Start command prompt in ADMINISTRATOR mode
|
||||
5) Run C:\wPublic\bin\InstalSSh.bat in the above command prompt
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
$source = "https://github.com/PowerShell/Win32-OpenSSH/releases/download/v8.9.1.0p1-Beta/OpenSSH-Win64.zip"
|
||||
$source = "https://github.com/PowerShell/Win32-OpenSSH/releases/download/v9.2.2.0p1-Beta/OpenSSH-Win64.zip"
|
||||
$source = "https://github.com/PowerShell/Win32-OpenSSH/releases/download/v9.8.3.0p2-Preview/OpenSSH-Win64.zip"
|
||||
$destination = "C:\Packages\OpenSSH-Win64.zip"
|
||||
|
||||
Invoke-WebRequest -Uri $source -OutFile $destination
|
||||
|
||||
@ -1,3 +1,15 @@
|
||||
New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
|
||||
# New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
|
||||
|
||||
Set-Service sshd -StartupType Automatic
|
||||
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."
|
||||
}
|
||||
@ -1,18 +1,20 @@
|
||||
@echo off
|
||||
|
||||
set check_computername=%COMPUTERNAME%
|
||||
echo "Found computer %check_computername%"
|
||||
|
||||
set PACKAGES="C:\Packages"
|
||||
set WPUBLIC="C:\wPublic"
|
||||
|
||||
set POWERSHELL=%SYSTEMROOT%\system32\WindowsPowerShell\v1.0\powershell.exe
|
||||
|
||||
mkdir %PACKAGES%
|
||||
|
||||
call %WPUBLIC%\bin\SpeedUpPS.bat
|
||||
|
||||
echo "------- attempting uninstall first"
|
||||
set PSFILE="C:\Program Files\OpenSSH\uninstall-sshd.ps1"
|
||||
if exist %PSFILE% (
|
||||
echo "SSH uninstall script"
|
||||
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE%
|
||||
%POWERSHELL% -ExecutionPolicy Bypass -File %PSFILE%
|
||||
)
|
||||
|
||||
del /f/s/q "C:\Program Files\OpenSSH\*.*"
|
||||
@ -21,28 +23,29 @@ rmdir /s/q "C:\Program Files\OpenSSH"
|
||||
del /f/s/q "C:\Packages\OpenSSH-Win64\*.*"
|
||||
rmdir /s/q "C:\Packages\OpenSSH-Win64"
|
||||
|
||||
echo "Download and unpack OpenSSH"
|
||||
echo "------- Download and unpack OpenSSH"
|
||||
set PSFILE="%WPUBLIC%\bin\Download.ps1"
|
||||
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE%
|
||||
%POWERSHELL% -ExecutionPolicy Bypass -File %PSFILE%
|
||||
|
||||
if exist "C:\Program Files\OpenSSH\sshd.exe" (
|
||||
echo "OPENSSH already installed"
|
||||
)
|
||||
else (
|
||||
echo "NEW installation"
|
||||
robocopy "%PACKAGES%\OpenSSH-Win64" "C:\Program Files\OpenSSH" /E
|
||||
)
|
||||
echo "NEW installation"
|
||||
robocopy "%PACKAGES%\OpenSSH-Win64" "C:\Program Files\OpenSSH" /E
|
||||
|
||||
echo "------- Attempting install"
|
||||
set PSFILE="C:\Program Files\OpenSSH\install-sshd.ps1"
|
||||
if exist %PSFILE% (
|
||||
echo "SSH install script"
|
||||
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE%
|
||||
%POWERSHELL% -ExecutionPolicy Bypass -File %PSFILE%
|
||||
)
|
||||
|
||||
echo "------- Fix firewall"
|
||||
set PSFILE="%WPUBLIC%\bin\Firewall.ps1"
|
||||
if exist %PSFILE% (
|
||||
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE%
|
||||
%POWERSHELL% -ExecutionPolicy Bypass -File %PSFILE%
|
||||
net start sshd
|
||||
)
|
||||
|
||||
curl.exe --output C:\BaseGitClone.bat --url https://mint.nopenso.com/mirror/wBase/raw/branch/main/BaseGitClone.bat
|
||||
curl.exe --output C:\BaseGitClone.bat --url https://git.cabinbagonly.com/mirror/wBase/raw/branch/main/BaseGitClone.bat
|
||||
curl.exe --output C:\pull.bat --url https://git.cabinbagonly.com/mirror/wPublic/raw/branch/main/bin/pull.bat
|
||||
|
||||
call C:\pull.bat
|
||||
call C:\Scripts\wbase\bin\SpeedUpPS.bat
|
||||
|
||||
@ -1,43 +0,0 @@
|
||||
function listAumids( $userAccount ) {
|
||||
|
||||
if ($userAccount -eq "allusers")
|
||||
{
|
||||
# Find installed packages for all accounts. Must be run as an administrator in order to use this option.
|
||||
$installedapps = Get-AppxPackage -allusers
|
||||
}
|
||||
elseif ($userAccount)
|
||||
{
|
||||
# Find installed packages for the specified account. Must be run as an administrator in order to use this option.
|
||||
$installedapps = get-AppxPackage -user $userAccount
|
||||
}
|
||||
else
|
||||
{
|
||||
# Find installed packages for the current account.
|
||||
$installedapps = get-AppxPackage
|
||||
}
|
||||
|
||||
$aumidList = @()
|
||||
foreach ($app in $installedapps)
|
||||
{
|
||||
foreach ($id in (Get-AppxPackageManifest $app).package.applications.application.id)
|
||||
{
|
||||
$aumidList += $app.packagefamilyname + "!" + $id
|
||||
}
|
||||
}
|
||||
|
||||
return $aumidList
|
||||
}
|
||||
|
||||
# Get a list of AUMIDs for the current account:
|
||||
listAumids
|
||||
|
||||
# Get a list of AUMIDs for an account named “CustomerAccount”:
|
||||
listAumids("CustomerAccount")
|
||||
|
||||
# Get a list of AUMIDs for all accounts on the device:
|
||||
listAumids("allusers")
|
||||
|
||||
get-wmiobject Win32_Product | Format-Table IdentifyingNumber, Name, LocalPackage -AutoSize
|
||||
|
||||
|
||||
Get-AppxPackage -allusers
|
||||
@ -1,10 +0,0 @@
|
||||
@echo off
|
||||
set check_computername=%COMPUTERNAME%
|
||||
echo "Found computer %check_computername%"
|
||||
|
||||
set PACKAGES="C:\Packages"
|
||||
set WPUBLIC="C:\wPublic"
|
||||
|
||||
echo "Dump software list"
|
||||
set PSFILE="%WPUBLIC%\bin\ListSoftware.ps1"
|
||||
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE% > "C:\%check_computername%.txt"
|
||||
@ -1,18 +0,0 @@
|
||||
function Optimize-PowershellAssemblies {
|
||||
# NGEN powershell assembly, improves startup time of powershell by 10x
|
||||
$old_path = $env:path
|
||||
try {
|
||||
$env:path = [Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory()
|
||||
[AppDomain]::CurrentDomain.GetAssemblies() | % {
|
||||
if (! $_.location) {continue}
|
||||
$Name = Split-Path $_.location -leaf
|
||||
if ($Name.startswith("Microsoft.PowerShell.")) {
|
||||
Write-Progress -Activity "Native Image Installation" -Status "$name"
|
||||
ngen install $_.location | % {"`t$_"}
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
$env:path = $old_path
|
||||
}
|
||||
}
|
||||
Optimize-PowershellAssemblies
|
||||
@ -1,11 +0,0 @@
|
||||
@echo off
|
||||
set check_computername=%COMPUTERNAME%
|
||||
echo "Found computer %check_computername%"
|
||||
|
||||
set PACKAGES="C:\Packages"
|
||||
set WPUBLIC="C:\wPublic"
|
||||
|
||||
echo "Speed up Powershell processing"
|
||||
set PSFILE="%WPUBLIC%\bin\SpeedUp.ps1"
|
||||
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE%
|
||||
|
||||
48
bin/archive/InstallSSH.bat
Executable file
48
bin/archive/InstallSSH.bat
Executable file
@ -0,0 +1,48 @@
|
||||
@echo off
|
||||
set check_computername=%COMPUTERNAME%
|
||||
echo "Found computer %check_computername%"
|
||||
|
||||
set PACKAGES="C:\Packages"
|
||||
set WPUBLIC="C:\wPublic"
|
||||
|
||||
mkdir %PACKAGES%
|
||||
|
||||
call %WPUBLIC%\bin\SpeedUpPS.bat
|
||||
|
||||
set PSFILE="C:\Program Files\OpenSSH\uninstall-sshd.ps1"
|
||||
if exist %PSFILE% (
|
||||
echo "SSH uninstall script"
|
||||
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE%
|
||||
)
|
||||
|
||||
del /f/s/q "C:\Program Files\OpenSSH\*.*"
|
||||
rmdir /s/q "C:\Program Files\OpenSSH"
|
||||
|
||||
del /f/s/q "C:\Packages\OpenSSH-Win64\*.*"
|
||||
rmdir /s/q "C:\Packages\OpenSSH-Win64"
|
||||
|
||||
echo "Download and unpack OpenSSH"
|
||||
set PSFILE="%WPUBLIC%\bin\Download.ps1"
|
||||
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE%
|
||||
|
||||
if exist "C:\Program Files\OpenSSH\sshd.exe" (
|
||||
echo "OPENSSH already installed"
|
||||
)
|
||||
else (
|
||||
echo "NEW installation"
|
||||
robocopy "%PACKAGES%\OpenSSH-Win64" "C:\Program Files\OpenSSH" /E
|
||||
)
|
||||
|
||||
set PSFILE="C:\Program Files\OpenSSH\install-sshd.ps1"
|
||||
if exist %PSFILE% (
|
||||
echo "SSH install script"
|
||||
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE%
|
||||
)
|
||||
|
||||
set PSFILE="%WPUBLIC%\bin\Firewall.ps1"
|
||||
if exist %PSFILE% (
|
||||
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE%
|
||||
net start sshd
|
||||
)
|
||||
|
||||
curl.exe --output C:\BaseGitClone.bat --url https://mint.nopenso.com/mirror/wBase/raw/branch/main/BaseGitClone.bat
|
||||
16
bin/pull.bat
Normal file
16
bin/pull.bat
Normal file
@ -0,0 +1,16 @@
|
||||
|
||||
if not exist "C:\Packages" mkdir "C:\Packages"
|
||||
if not exist "C:\Scripts" mkdir "C:\Scripts"
|
||||
|
||||
cd \packages
|
||||
curl --ssl-no-revoke -o c:\Packages\wlocal.zip https://git.cabinbagonly.com/mirror/wLocal/archive/main.zip
|
||||
curl --ssl-no-revoke -o c:\Packages\wbase.zip https://git.cabinbagonly.com/mirror/wBase/archive/main.zip
|
||||
curl --ssl-no-revoke -o c:\Packages\wpublic.zip https://git.cabinbagonly.com/mirror/wPublic/archive/main.zip
|
||||
|
||||
cd \scripts
|
||||
tar -xvf c:\Packages\wlocal.zip
|
||||
tar -xvf c:\Packages\wbase.zip
|
||||
tar -xvf c:\Packages\wpublic.zip
|
||||
|
||||
del \pull.bat
|
||||
|
||||
Reference in New Issue
Block a user