1 #WebDriverException: Message: nknown error: cannot determine loading status .EXAMPLE
2 # . C:\src\dotfiles\Microsoft.PowerShell_profile.ps1
5 # Get-ChildItem -Path 'C:\Repos' -Filter "*.psd1" -Recurse | ForEach-Object -Process {
6 # $Path = Split-Path -Path $_.Directory -Parent
7 # $env:PSModulePath = $env:PSModulePath + ";$($Path)"
9 # $env:PSModulePath = $env:PSModulePath.Replace("\\ad.uillinois.edu\techsvc\home\$($ENV:USERNAME)\Documents\PowerShell\Modules;",'')
11 function Add-ToProfile {
15 $profileContents = [string]::join([environment]::newline, (get-content -path $Path))
16 invoke-expression $profileContents
25 Add-ToProfile $env:src\dotfiles\files\paths.ps1
26 Add-ToProfile $env:src\dotfiles\files\env.ps1
28 # You can pry my unix commands out of my cold dead fingers
29 Set-Alias which get-command
31 # Linux-like up/down in shell
32 Set-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward
33 Set-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward
34 Set-PSReadlineOption -HistorySavePath $env:src\PSHistory.log
36 # Delay loading PoshGit for speed.
37 function Enable-PoshGit {
38 Import-Module posh-git
40 New-Alias pg Enable-PoshGit
41 Write-Host "+ Type 'pg' to enable PoshGit"
44 if((Get-Location).Path -eq $HOME){
48 function Get-GitLog() {
52 function Get-GitStatus() {
56 # Tell my scripts which GitHub repositories to look in.
57 $env:GITHUB_USERNAME = 'edthedev'
58 $env:GITHUB_REPOS = @(
59 'techservicesillinois/SecOps-Tools',
60 'techservicesillinois/secdev-job-aids',
61 'techservicesillinois/awscli-login',
62 'techservicesillinois/farmit',
63 'uillinois-community/uillinois-community.github.io',
64 'techservicesillinois/SecOps-Powershell-CSOC',
65 'techservicesillinois/SecOps-Powershell-CISDSC',
66 'techservicesillinois/secops-splunk-null-router'
68 $ENV:TS_REPOS = $ENV:GITHUB_REPOS.split(' ') | Where { $_ -like 'techser*' }
72 New-Alias ol Get-GitLog
73 New-Alias st Get-GitStatus
76 New-Alias dash Show-MyDashboard # from dash.psm1
78 function Get-JournalAgenda() {
79 agenda.exe -path "$HOME/Journal/{YYYY}/{MM}-{DD}.md"
81 New-Alias today Get-JournalAgenda
83 function Invoke-FixWslVPN {
84 Get-NetAdapter | Where-Object {$_.InterfaceDescription -Match "Cisco AnyConnect Secure Mobility Client Virtual Miniport Adapter for Windows x64"} | Set-NetIPInterface -InterfaceMetric 6000
87 # Write-Host "Real profile file is at $env:realProfile ($$env:realProfile)"