markpjohnson
1/7/2015 - 5:15 AM

Titan Environment

Titan Environment

if ($runWindowsUpdate -eq $TRUE) {
	Install-WindowsUpdate -acceptEula -SuppressReboots
}
$showThisPcOnDesktop = $TRUE

function Restart-Explorer {
    try {
        Write-BoxstarterMessage "Restarting the Windows Explorer process..."
        $user = Get-CurrentUser
        try { $explorer = Get-Process -Name explorer -ErrorAction stop -IncludeUserName } 
        catch { $global:error.RemoveAt(0) }
        
        if ($explorer -ne $null) { 
            $explorer | ? { $_.UserName -eq "$($user.Domain)\$($user.Name)"} | Stop-Process -Force -ErrorAction Stop | Out-Null
        }

        Start-Sleep 1

        if (!(Get-Process -Name explorer -ErrorAction SilentlyContinue)) {
            $global:error.RemoveAt(0)
            start-Process -FilePath explorer
        }
    } catch { $global:error.RemoveAt(0) }
}

function Verify-Key {
    [CmdletBinding()]
    param(
        [Parameter(Position=0,Mandatory=1)] [string]$regKey
    )

    if ((Test-Path $regKey) -eq $FALSE) {
        New-Item $regKey
    }
}

Update-ExecutionPolicy Unrestricted
Set-WindowsExplorerOptions -EnableShowFileExtensions -EnableShowHiddenFilesFoldersDrives -EnableShowFullPathInTitleBar -EnableExpandToOpenFolder
Set-StartScreenOptions -EnableDesktopBackgroundOnStart -EnableSearchEverywhereInAppsView -EnableBootToDesktop -EnableShowStartOnActiveScreen -EnableShowAppsViewOnStartScreen
Set-TaskbarOptions -Size Small -Combine Full

# turn off IE enhanced security config
Disable-InternetExplorerESC
Enable-RemoteDesktop

$key = 'HKCU:\Console'

# command prompt settings
Set-ItemProperty $key QuickEdit 1
Set-ItemProperty $key ScreenBufferSize 0x270F0078
Set-ItemProperty $key WindowSize 0x2e0078
Set-ItemProperty $key ColorTable00 0x562401
Set-ItemProperty $key ColorTable01 0x00FFFFFF
Set-ItemProperty $key ScreenColors 0x00000001

$key = 'HKCU:\Software\Microsoft\Windows\Shell\Bags\1\Desktop'

# small desktop icons
Set-ItemProperty -Path $key -Name IconSize -Value 32
Get-ItemProperty -Path $key -Name FFlags | ForEach-Object { Set-ItemProperty -Path $key -Name FFlags -Value ($_.FFlags -bor 0x1) }

# show "This PC" on desktop
if ($showThisPcOnDesktop -eq $TRUE) {
    $key = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons'
    Verify-Key $key

    $key = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel'
    Verify-Key $key
    Set-ItemProperty -Path $key -Name '{20D04FE0-3AEA-1069-A2D8-08002B30309D}' -Value 0

    $key = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu'
    Verify-Key $key
    Set-ItemProperty -Path $key -Name '{20D04FE0-3AEA-1069-A2D8-08002B30309D}' -Value 0
}

# Changing UAC notifications
$key = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System'
Set-ItemProperty $key ConsentPromptBehaviorAdmin 0

# WINDOWS EXPLORER AND START MENU CUSTOMIZATIONS
$key = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced'

# open win explorer to ThisPC
Verify-Key "$key\LaunchTo"
Set-ItemProperty $key LaunchTo 1
# replace winx command prompt with powershell
Verify-Key "$key\DontUsePowerShellOnWinX"
Set-ItemProperty $key DontUsePowerShellOnWinX 0
# show start menu on current monitor
Verify-Key "$key\MonitorOverride"
Set-ItemProperty $key MonitorOverride 1
# remove win explorer checkboxes
Set-ItemProperty $key AutoCheckSelect 0
Set-ItemProperty $key Start_MinMFU 14
Set-ItemProperty $key Start_JumpListItems 14
Set-ItemProperty $key TaskbarSmallIcons 1
Set-ItemProperty $key TaskbarGlomLevel 1
Set-ItemProperty $key Start_ShowControlPanel 2
Set-ItemProperty $key Start_AdminToolsRoot 2
Set-ItemProperty $key NavPaneShowAllFolders 1
Set-ItemProperty $key NavPaneExpandToCurrentFolder 1
Set-ItemProperty $key HideDrivesWithNoMedia 0
Set-ItemProperty $key PersistBrowsers 1
Set-ItemProperty $key HideFileExt 0
Set-ItemProperty $key Hidden 1

Restart-Explorer
URL to call in IE

http://boxstarter.org/package/nr/url?https://gist.githubusercontent.com/markpjohnson/59ac78b1376c00b7a248/raw/f5d15342a5993fb59468b5002df653605496212b/Global.ps1
function Install-WorkstationApp {
	param(
        [Parameter(Mandatory = $true, Position = 0)]
		[string] $App,
        [string] $InstallationPath = $null
	)

	Write-Debug "Starting to install $App"
	if ($InstallationPath) {
        choco install $App -y -packageParameters '/InstallationPath:"' + $InstallationPath + '"'
    } else {
        choco install $App -y
    }
	Write-Verbose "Finished installing $App"
}

# workstation apps
Install-WorkstationApp -App displayfusion
Install-WorkstationApp -App listary
Install-WorkstationApp -App sublimetext3
Install-WorkstationApp -App 'sublimetext3.packagecontrol'
Install-WorkstationApp -App bingdesktop
Install-WorkstationApp -App beyondcompare
Install-WorkstationApp -App linqpad
Install-WorkstationApp -App reflector
Install-WorkstationApp -App sourcetree
Install-WorkstationApp -App markdownpad2
Install-WorkstationApp -App phraseexpress
Install-WorkstationApp -App lastpass
Install-WorkstationApp -App softerraldapbrowser
Install-WorkstationApp -App virtualclonedrive
Install-WorkstationApp -App nugetpackageexplorer
Install-WorkstationApp -App 'adobe-creative-cloud'
Install-WorkstationApp -App dashlane
Install-WorkstationApp -App github
Install-WorkstationApp -App 'resharper-platform'
Install-WorkstationApp -App slack
Install-WorkstationApp -App visualstudiocode
Install-WorkstationApp -App windirstat
Install-WorkstationApp -App 'awstools.powershell'

# Install-WorkstationApp -App sysinternals -InstallationPath 'C:\Tools\SysInternals'
function Install-WorkstationApp {
	param(
        [Parameter(Mandatory = $true, Position = 0)]
		[string] $App,
        [string] $InstallationPath = $null
	)

	Write-Debug "Starting to install $App"
	if ($InstallationPath) {
        choco install $App -y -packageParameters '/InstallationPath:"' + $InstallationPath + '"'
    } else {
        choco install $App -y
    }
	Write-Verbose "Finished installing $App"
}

Install-WorkstationApp -App dropbox
Install-WorkstationApp -App evernote
Install-WorkstationApp -App spotify

cd "$env:appdata\Sublime Text 3\Packages\"
rmdir -recurse User
cmd /c mklink /D User $env:userprofile\Dropbox\Apps\Sublime\User
# universal apps
choco install googlechrome.canary -y
choco install notepadplusplus.install -y
choco install 7zip.install -y

# frameworks to install
# choco install dotnet4.5.1 -y
choco install teamviewer -y
choco install slack -y

AWSCLI64.msi
Boxstarter.2.6.41.zip
Dashlane_Launcher_bchrome-1458652606.exe
DropboxInstaller.exe
Git-2.7.4-64-bit.exe
GitHubSetup.exe
iobituninstaller.exe
ListaryBeta2177.exe
mongochef-x64.msi.zip
mongodb-win32-x86_64-3.2.4-signed.msi
Multiplicity3_setup.exe
node-v4.4.1-x64.msi
Options_3.20.35.exe
putty-0.67-installer.msi
python-3.4.3.amd64.msi
Setup.X86.en-us_O365ProPlusRetail_2e2d3549-93a1-4cbf-bb76-3f0afa67f51d_TX_PR_b_48_.exe
unlocker-setup.exe
WebStorm-2016.1.exe
winscp577setup.exe