4 Setup my Windows PowerShell environment.
10 Relies heavily on the Chocolatey package manager.
15 [Parameter(Mandatory=$true, HelpMessage="Install Development Tools")]
17 [Parameter(Mandatory=$true, HelpMessage="Install Modeling Tools")]
21 # Setup my PowerShell Profile (on Windows)
22 if(-Not(Test-Path -Path $profile)) {
23 New-Item -Path "$profile" -ItemType File
26 $sourceMeFile = "$pwd\Microsoft.PowerShell_profile.ps1"
27 $sourceMeLine = '$profileContents = [string]::join([environment]::newline, (get-content -path'
28 $sourceMeLine += $sourceMeFile
29 $sourceMeLine += '));invoke-expression $profileContents'
31 $doneFlagFile = "./DONE.md"
32 $doBootStrap = -Not (Test-Path -Path $doneFlagFile)
34 $profileContents = Get-Content $profile
35 if(! $profileContents -contains $sourceMeLine) {
36 Add-Content -Path $profile -Value $sourceMeLine
40 $testchoco = powershell choco -v
42 Write-Output "Seems Chocolatey is not installed, installing now..."
43 Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
46 # Install Python3 and Pip
48 # Install Stub PowerShell Profile that sources the one from DotFiles
50 # Install profile for Windows Terminal
51 $destFile = "C:\Users\delaport\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\profiles.json"
52 if(-Not(Test-Path -Path $destFile)) {
53 Copy-Item -Path ./profiles.json -Destination $destFile
55 # Brute force ensure we update our git copy once in awhile.
56 Copy-Item -Path $destFile -Destination ./profiles.json
59 # OWASP ZAP for web application security scanning
64 ## TODO: Can I set this via command line: chrome://flags/#enable-force-dark
68 New-Item -ItemType File -Path $doneFlagFile
71 # ArchiMate for enterprise modeling
81 PowerShellGet\Install-Module posh-git -Scope CurrentUser -AllowPrerelease -Force
86 iwr -useb https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim |`
87 ni $HOME/vimfiles/autoload/plug.vim -Force