Skip to content

Instantly share code, notes, and snippets.

@szaiser
Last active May 27, 2018 17:26
Show Gist options
  • Save szaiser/4edd20bc83955d69ec1b563b9fdfd305 to your computer and use it in GitHub Desktop.
Save szaiser/4edd20bc83955d69ec1b563b9fdfd305 to your computer and use it in GitHub Desktop.
# powershell > v3
# . { iwr -useb https://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
# Install-BoxstarterPackage -PackageName https://gist.github.com/mwrock/7382880/raw/f6525387b4b524b8eccef6ed4d5ec219c82c0ac7/gistfile1.txt -DisableReboots
#---- TEMPORARY ---
Disable-UAC
Install-WindowsUpdate -Full
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar
Disable-GameBarTips
Disable-BingSearch
Enable-RemoteDesktop
Set-StartScreenOptions -EnableBootToDesktop -EnableShowStartOnActiveScreen
Disable-ComputerRestore "C:\"
# from https://gist.github.com/ElJefeDSecurIT/014fcfb87a7372d64934995b5f09683e
Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol -NoRestart
#ElJefe: Removing a bunch of other unnecessary stuff.Because they are not needed on a work box.
# don't need work folders if u got OneDrive for Business.
Disable-WindowsOptionalFeature -Online -FeatureName WorkFolders-Client -NoRestart
# don't need remote differential compression if you never intend to pull from network shares...
Disable-WindowsOptionalFeature -Online -FeatureName MSRDC-Infrastructure -NoRestart
# you don't need Fax & Scan, XPS formats, XPS printing services, or printing to http printers.
Disable-WindowsOptionalFeature -Online -FeatureName FaxServicesClientPackage -NoRestart
Disable-WindowsOptionalFeature -Online -FeatureName Xps-Foundation-Xps-Viewer -NoRestart
Disable-WindowsOptionalFeature -Online -FeatureName Printing-XPSServices-Features -NoRestart
Disable-WindowsOptionalFeature -Online -FeatureName Printing-Foundation-InternetPrinting-Client -NoRestart
# you don't need media playback.
Disable-WindowsOptionalFeature -Online -FeatureName WindowsMediaPlayer -NoRestart
Disable-WindowsOptionalFeature -Online -FeatureName MediaPlayback -NoRestart
#eljefe: There are some services that you simply do not need if you want to lay low. go spelunking in the Services.msc to see why.
# you are not pulling from shares, you should not expose shares...die LAN Man! with my last breath I will curse thee
Set-service -Name LanmanServer -StartupType Disabled
#print spooler: Dead
Set-service -Name Spooler -StartupType Disabled
# Tablet input: pssh nobody use tablet input. its silly.just write right in onenote
Set-service -Name TabletInputService -StartupType Disabled
# Telephony API is tell-a-phony
Set-service -Name TapiSrv -StartupType Disabled
#geolocation service : u can't find me.
Set-service -Name lfsvc -StartupType Disabled
# ain't no homegroup here.
Set-service -Name HomeGroupProvider -StartupType Disabled
# u do not want ur smartcard cert to propagate to the local cache, do you?
Set-service -Name CertPropsvc -StartupType Disabled
# who needs branchcache?
Set-service -Name PeerDistSvc -StartupType Disabled
# i don't need to keep links from NTFS file shares across the network - i haz office.
Set-service -Name TrkWks -StartupType Disabled
# i don't use iscsi
Set-service -Name MSISCSI -StartupType Disabled
# why is SNMPTRAP still on windows 10? i mean, really, who uses SNMP? is it even a real protocol anymore?
Set-service -Name SNMPTRAP -StartupType Disabled
# Peer to Peer discovery svcs...Begone!
Set-service -Name PNRPAutoReg -StartupType Disabled
Set-service -Name p2pimsvc -StartupType Disabled
Set-service -Name p2psvc -StartupType Disabled
Set-service -Name PNRPsvc -StartupType Disabled
# no netbios over tcp/ip. unnecessary.
Set-service -Name lmhosts -StartupType Disabled
# this is like plug & play only for network devices. no thx. k bye.
Set-service -Name SSDPSRV -StartupType Disabled
# YOU DO NOT NEED TO PUBLISH FROM THIS DEVICE. Discovery Resource Publication service:
Set-service -Name FDResPub -StartupType Disabled
#"Function Discovery host provides a uniform programmatic interface for enumerating system resources" - NO THX.
Set-service -Name fdPHost -StartupType Disabled
#intel Proset wireless registry thing. curse thee:
Set-service -Name RegSrvc -StartupType Disabled
#optimize the startup cache...i think. on SSD i don't think it really matters.
set-service SysMain -StartupType Automatic
##################################################################################################################
# install packages
##################################################################################################################
cinst powershell
cinst dropbox
cinst procexp
#cinst geforce-experience
#cinst geforce-game-ready-driver
#cinst logitechgaming
cinst multicommander
cinst keypirinha
cinst flashplayerplugin
cinst notepadplusplus.install
cinst atom
cinst sublimetext3
# cinst notepadreplacer -ia '"/NOTEPAD=""C:\Program Files (x86)\Notepad++\notepad++.exe"" /VERYSILENT"'
cinst firefox
cinst googlechrome
cinst strawberryperl
cinst javaruntime
cinst potplayer
cinst vlc
cinst 7zip.install
cinst git
#cinst winscp.install
cinst keepass
#cinst kitty --package-parameters='/Portable'
#cinst tortoisehg
cinst teamviewer
#cinst virtualbox
cinst windirstat
cinst conemu
#cinst consolez
cinst foxitreader
cinst pdfcreator
cinst sumatrapdf.install
#cinst pdfxchangeviewer
cinst autohotkey.install
cinst irfanview
cinst inkscape
#cinst blender
#cinst paint.net
cinst lockhunter
cinst skype
cinst sysinternals
cinst everything -params '"/service /run-on-system-startup /efu-association"'
#cinst rdcman
#cinst anaconda2 ia="'/InstallationType=AllUsers /RegisterPython=0 /S /D=""C:\ProgramData\Anaconda\""'"
#cinst jetbrainstoolbox
#cinst miktex
cinst ghostscript.app
cinst imagemagick.app
#cinst imagemagick
#cinst texniccenter
cinst clink
#cinst zotero-standalone
#cinst thunderbird
cinst gimp
cinst steam
#cinst uplay
#cinst origin
cinst spotify
#cinst f.lux
#cinst nmap #network scanner
cinst procmon
#--- Restore Temporary Settings ---
Write-BoxstarterMessage "re-Enable UAC"
Enable-UAC
#Write-BoxstarterMessage " Enabling Windows Update"
Enable-MicrosoftUpdate
Install-WindowsUpdate -acceptEula
#--- Rename the Computer ---
# Requires restart, or add the -Restart flag
#eljefe I have a strange sence of humor...
$computername = "NUKIZZY"
if ($env:computername -ne $computername) {
Write-BoxstarterMessage "Renaming Computer to: $computername "
Rename-Computer -NewName $computername
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment