Skip to content

Instantly share code, notes, and snippets.

@jacqinthebox
Created January 9, 2018 17:29
Show Gist options
  • Save jacqinthebox/0271e3a347bb00310012b878e23af811 to your computer and use it in GitHub Desktop.
Save jacqinthebox/0271e3a347bb00310012b878e23af811 to your computer and use it in GitHub Desktop.
Mighty Powershell #powershell
Function New-Computer {
param(
[Parameter(Mandatory = $true)]
[ValidateSet('small','medium','large','x-large')]
[string]$installtype,
[Parameter(Mandatory = $true)]
[bool]$virtualmachine
)
Set-ExecutionPolicy Bypass
New-Item -path "registry::hklm\software\policies\microsoft\Internet Explorer\Main" -Force
New-ItemProperty -path "registry::hklm\software\policies\microsoft\Internet Explorer\Main" -Name DisableFirstRunCustomize -PropertyType dword -Value 1
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'HideFileExt' -Value 0
Invoke-WebRequest https://chocolatey.org/install.ps1 -UseBasicParsing | Invoke-Expression
Install-PackageProvider -Name Nuget -Force
Install-Module posh-git -Scope CurrentUser -Force
Install-Module oh-my-posh -Scope CurrentUser -Force
choco install visualstudiocode -force -yes
choco install git -force -yes
choco install notepadplusplus -force -yes
choco install 7zip.install -force -yes
choco install 7zip.commandline -force -yes
choco install firefox -force -yes
choco install sumatrapdf -force -yes
choco install sumatrapdf.install -force -yes
Install-Module ISESteroids -Scope CurrentUser -Force
if ($installtype -eq 'medium' -or 'large' -or 'x-large') {
choco install googlechrome -force -yes
choco install conemu -force -yes
}
if ($installtype -eq 'large' -or 'x-large') {
choco install listary -force -yes
choco install keepass -force -yes
choco install greenshot -force -yes
}
if ($installtype -eq 'x-large') {
choco install visualstudio2017enterprise -force -yes
choco install sql-server-management-studio -force -yes
choco install sql-server-express -force -yes
choco install resharper -force -yes
}
if ($virtualmachine -eq $false) {
choco install dropbox -force -yes
choco install virtualbox -force -yes
choco install vagrant -force -yes
choco install vlc -force -yes
choco install slack -force -yes
choco install boostnote -force -yes
choco install lepton -force -yes
choco install docker-toolbox -yes
#Enable-WindowsOptionalFeature -Online -FeatureName:Microsoft-Hyper-V -All -NoRestart
}
#Get-AppxPackage -AllUsers | where-object {$_.name -notlike "*store*"} | Remove-AppxPackage
#Get-appxprovisionedpackage -online | where-object {$_.packagename -notlike "*store*"} | Remove-AppxProvisionedPackage -online
Set-ExecutionPolicy restricted
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment