Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Powershell x86 Issue #615 - Alternate Implementation of Set-LocalUser #658

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,6 @@ param (
)
$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'

# https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.localaccounts/set-localuser
if ( -not ([Environment]::Is64BitProcess)) {
Write-Host "`t[!] It seems like you are using 32 bit powershell. Exiting because some commands do not work correctly in this mode." -ForegroundColor Red
Write-Host "`t[-] Hint: Don't run powershell x86" -ForegroundColor Yellow
Start-Sleep 3
exit 1
}

# Function to test the network stack. Ping/GET requests to the resource to ensure that network stack looks good for installation
function Test-WebConnection {
Expand Down Expand Up @@ -340,7 +332,7 @@ if (-not $noChecks.IsPresent) {
}

Write-Host "[+] Setting password to never expire to avoid that a password expiration blocks the installation..."
Set-LocalUser -Name "${Env:UserName}" -PasswordNeverExpires $true
wmic useraccount here "name='${Env:UserName}'" set PasswordExpires=False

# Prompt user to remind them to take a snapshot
Write-Host "[-] Have you taken a VM snapshot to ensure you can revert to pre-installation state? (Y/N): " -ForegroundColor Yellow -NoNewline
Expand Down