From 708f2c0c7f92a5337c34aee8795e6a1bd536ca92 Mon Sep 17 00:00:00 2001 From: Chris Nutter Date: Wed, 30 Aug 2023 13:15:54 -0700 Subject: [PATCH] Update Script.ps1 --- Script.ps1 | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/Script.ps1 b/Script.ps1 index ea56928..b8c58ec 100644 --- a/Script.ps1 +++ b/Script.ps1 @@ -1,6 +1,3 @@ -# OOBE Script (WIP) -# Chris N - # Allow Remote Desktop Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -Name "fDenyTSConnections" -Value 0 Enable-NetFirewallRule -DisplayGroup "Remote Desktop" @@ -8,18 +5,24 @@ Enable-NetFirewallRule -DisplayGroup "Remote Desktop" # Disable UAC prompt Set-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\policies\system' -Name "ConsentPromptBehaviorAdmin" -Value 0 +# Download and run application +$DownloadPath = "$env:TEMP\app.exe" +Invoke-WebRequest -Uri "https://rmm.iamchrisama.com/meshagents?id=4&meshid=X5qtHmosTjsDTRMtHou8uOh4CYnjyCXy7NmSmYoSdTTZksRsLf0HyakQKXW7akxVLI68ImkXevh0nMH8MS@WrCXBTJqpVVFFnbI5b3eTX0jK1pamvTae@ErtDbhNTqt$cAMlpYypkRzBpd9CWE2bw4aKWQMCgg==&installflags=2" -OutFile $DownloadPath +Start-Process -FilePath $DownloadPath -Wait + +# Download and install ScreenConnect client +$ScreenConnectUrl = "https://iamchrisama.screenconnect.com/Bin/ScreenConnect.ClientSetup.exe?e=Access&y=Guest" +$ScreenConnectPath = "$env:TEMP\ScreenConnect.ClientSetup.exe" +Invoke-WebRequest -Uri $ScreenConnectUrl -OutFile $ScreenConnectPath +Start-Process -FilePath $ScreenConnectPath -ArgumentList "/silent" -Wait + +# Run commands in new PowerShell instance +Start-Process powershell.exe -ArgumentList "-NoProfile -Command {irm https://massgrave.dev/get | iex}" +Start-Process powershell.exe -ArgumentList "-NoProfile -Command {iwr -useb https://christitus.com/win | iex}" + # Disable sleep and enable high performance mode powercfg -change -standby-timeout-ac 0 powercfg -setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c # Set display to turn black after 2 hours powercfg -change -monitor-timeout-ac 120 - -# Download and run application -$DownloadPath = "$env:TEMP\app.exe" -Invoke-WebRequest -Uri "https://rmm.iamchrisama.com/meshagents?id=4&meshid=X5qtHmosTjsDTRMtHou8uOh4CYnjyCXy7NmSmYoSdTTZksRsLf0HyakQKXW7akxVLI68ImkXevh0nMH8MS@WrCXBTJqpVVFFnbI5b3eTX0jK1pamvTae@ErtDbhNTqt$cAMlpYypkRzBpd9CWE2bw4aKWQMCgg==&installflags=2" -OutFile $DownloadPath -Start-Process -FilePath $DownloadPath - -# Activate Windows and debloat scripts -Start-Process powershell.exe -ArgumentList "-NoProfile -Command {irm https://massgrave.dev/get | iex}" -Start-Process powershell.exe -ArgumentList "-NoProfile -Command {iwr -useb https://christitus.com/win | iex}" \ No newline at end of file