Skip to content

Instantly share code, notes, and snippets.

@heri16
Last active May 3, 2021 02:41
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save heri16/a875a4a27bfe021abbe0f99a4510a402 to your computer and use it in GitHub Desktop.
Save heri16/a875a4a27bfe021abbe0f99a4510a402 to your computer and use it in GitHub Desktop.
Install Chocolatey Package Manager (and Enable WinRM)
# Install chocolatey.org & 7-zip
Set-ExecutionPolicy AllSigned -Force
$env:chocolateyDownloadUrl = 'https://chocolatey.org/api/v2/package/chocolatey/0.10.3'
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install 7zip virustotaluploader -y
# Enabling WinRM
Write-Host "***Enabling WinRM Feature...***"
Invoke-Expression ((New-Object System.Net.Webclient).DownloadString('https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1'))
# Uninstall Legacy Windows Features
Write-Host "***Removing Legacy Windows Features...***"
Get-WindowsOptionalFeature -Online -FeatureName "SearchEngine-Client*" | Disable-WindowsOptionalFeature -Online -NoRestart
Get-WindowsOptionalFeature -Online -FeatureName "MicrosoftWindowsPowerShellV2*" | Disable-WindowsOptionalFeature -Online -NoRestart
Get-WindowsOptionalFeature -Online -FeatureName "Internet-Explorer*" | Disable-WindowsOptionalFeature -Online -NoRestart
Enable-WindowsOptionalFeature -Online -FeatureName "TelnetClient" -NoRestart
# Uninstall UniversalApp Bloatware (Store, Calculator, and WindowsPhotos are kept)
Write-Host "***Removing Universal Appx Bloatware Packages...***"
Get-AppxPackage -AllUsers | where-object {$_.name -notlike "*Microsoft.WindowsStore*"} | where-object {$_.name -notlike "*Microsoft.Windows*"} | Remove-AppxPackage
Get-AppxProvisionedPackage -online | where-object {$_.packagename -notlike "*Microsoft.WindowsStore*"} | where-object {$_.packagename -notlike "*Microsoft.Windows*"} | Remove-AppxProvisionedPackage -online
#choco install googlechrome -y
@heri16
Copy link
Author

heri16 commented May 20, 2017

iex (New-Object System.Net.Webclient).DownloadString("https://goo.gl/rthC1a")

@heri16
Copy link
Author

heri16 commented May 20, 2017

choco install anti-beacon -y

@heri16
Copy link
Author

heri16 commented May 20, 2017

choco install googlechrome -y

@heri16
Copy link
Author

heri16 commented May 20, 2017

choco install synctrayzor -y

@heri16
Copy link
Author

heri16 commented May 20, 2017

choco install zerotier-one -y

@heri16
Copy link
Author

heri16 commented May 22, 2017

choco install glasswire -y

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment