X-Git-Url: https://apps.delaporte.us/gitweb/dotfiles.git/blobdiff_plain/76117ab3b0b3cd6e09debf74e668fcc8d3bacf7c..bd9f3d19bc86ce9be64c505edca894a2dab92f06:/Microsoft.PowerShell_profile.ps1?ds=sidebyside diff --git a/Microsoft.PowerShell_profile.ps1 b/Microsoft.PowerShell_profile.ps1 index 109783a..4df4971 100644 --- a/Microsoft.PowerShell_profile.ps1 +++ b/Microsoft.PowerShell_profile.ps1 @@ -36,9 +36,10 @@ else { $ENV:PATH+=":$HOME/x16/x16-emulator" # x16 Emulator $ENV:PATH+=":$HOME/src/x16-demo/tools" # x16 python tools } + # alias renumber $HOME/src/x16-demo/ -$env:Journal = "~\Journal\2021" # allows cd $env:journal +$env:Journal = "~\Journal\2022" # allows cd $env:journal $env:minion = "$env:src\minion" # Import some home grown PowerShell modules, if they are installed. @@ -46,6 +47,9 @@ $env:minion = "$env:src\minion" $modPaths = Get-Childitem -Path "$env:src\dotfiles\psmodules" $modPaths += Get-Childitem -Path "$env:minion\psmodule" +# https://github.com/uillinois-community/powershell-scripts +$modPaths += Get-Childitem -Path "$env:src\powershell-scripts\modules" + # Windows Only Modules if($IsWindows){ $modPaths += Get-Childitem -Path "$env:src\dotfiles\win_psmodules" @@ -55,8 +59,10 @@ if($modPaths.length -eq 0){ } $modPaths | ForEach-Object { $fileName = $_.FullName - Import-Module $fileName - Write-Host ">> Loaded $fileName" + if($filename -Like "*.psm1") { + Import-Module $fileName + Write-Host ">> Loaded $fileName" + } } @@ -108,10 +114,31 @@ function Get-GitStatus() { git status -b --short } +# Tell my scripts which GitHub repositories to look in. +$env:GITHUB_USERNAME = 'edthedev' +$env:GITHUB_REPOS = @( + 'techservicesillinois/SecOps-Tools', + 'techservicesillinois/secdev-job-aids', + 'techservicesillinois/awscli-login', + 'techservicesillinois/farmit', + 'uillinois-community/uillinois-community.github.io', + 'techservicesillinois/SecOps-Powershell-CSOC' +) -join ' ' +$ENV:TS_REPOS = $ENV:GITHUB_REPOS.split(' ') | Where { $_ -like 'techser*' } + +# Todo List +$ENV:PATH+=";$env:src\todolist" # todo list utility edthedev\todolist +$env:todolist = "C:\Users\delaport\Journal\2022" +# New-Alias todo todolist + # Nice for git New-Alias ol Get-GitLog New-Alias st Get-GitStatus # Dashboard -New-Alias dash Get-MyDashboard # from dash.psm1 +New-Alias dash Show-MyDashboard # from dash.psm1 New-Alias agenda Get-JournalAgenda # from minion_go.psm1 + +function Invoke-FixWslVPN { + Get-NetAdapter | Where-Object {$_.InterfaceDescription -Match "Cisco AnyConnect Secure Mobility Client Virtual Miniport Adapter for Windows x64"} | Set-NetIPInterface -InterfaceMetric 6000 +} \ No newline at end of file