From d2824cb7716a9a4107b1deb32fe0652f5f82e9ff Mon Sep 17 00:00:00 2001 From: ek-dyoder Date: Mon, 18 May 2026 16:38:50 -0400 Subject: [PATCH] changed URL because git.io is commonly blocked --- Tools.ps1 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Tools.ps1 b/Tools.ps1 index 71c7c75..3871d5e 100644 --- a/Tools.ps1 +++ b/Tools.ps1 @@ -589,7 +589,7 @@ Function Import-MSP360Module { Write-Output "Installing MSP360 Powershell module" Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://git.io/JUSAA') + Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/msp360/MSP360-PSModule/master/private/Install-MSP360Module.ps1') Install-MSP360Module Import-Module -Name MSP360 } @@ -726,18 +726,18 @@ Function New-LocalAccount { } If ( $(Get-LocalUser -Name $Username -ErrorAction SilentlyContinue) ) { Write-Output "Updating user: ${Username}" - Try { Set-LocalUser -Name "${Username}" -Password $SecurePassword -FullName "${FullName}" -Description "${Description}" -AccountNeverExpires -PasswordNeverExpires } - Catch { Write-Error $_.Exception.Message ; Exit } + Try { Set-LocalUser -Name "${Username}" -Password $SecurePassword -FullName "${FullName}" -Description "${Description}" -AccountNeverExpires -PasswordNeverExpires | Out-Null } + Catch { Write-Error "Could not update user`n"+$_.Exception.Message ; Exit } } Else { Write-Output "Creating user: ${Username}" - Try { New-LocalUser -Name "${Username}" -Password $SecurePassword -FullName "${FullName}" -Description "${Description}" -AccountNeverExpires -PasswordNeverExpires } - Catch { Write-Error $_.Exception.Message ; Exit } + Try { New-LocalUser -Name "${Username}" -Password $SecurePassword -FullName "${FullName}" -Description "${Description}" -AccountNeverExpires -PasswordNeverExpires | Out-Null } + Catch { Write-Error "Could not create user`n"+$_.Exception.Message ; Exit } } If ( (-not($(Get-LocalGroupMember -Group "Administrators" -Member $Username -ErrorAction SilentlyContinue))) -and $MakeAdmin ) { Write-Output "Adding ""${Username}"" to local Administrators group" Try { Add-LocalGroupMember -Name "Administrators" -Member $(Get-LocalUser -Name "${Username}") } - Catch { Write-Error $_.Exception.Message ; Exit } + Catch { Write-Error "Could not add user to Administrators group`n"+$_.Exception.Message ; Exit } } If ( $Hide ) { $RegPath = "HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList"