From 91d5af11f499f2701e2cbff03eb3a8a727c42b06 Mon Sep 17 00:00:00 2001 From: Edward Delaporte Date: Wed, 25 Mar 2020 15:26:04 -0500 Subject: [PATCH] Import a toybox space. --- Microsoft.PowerShell_profile.ps1 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Microsoft.PowerShell_profile.ps1 b/Microsoft.PowerShell_profile.ps1 index c9d6ba2..759d655 100644 --- a/Microsoft.PowerShell_profile.ps1 +++ b/Microsoft.PowerShell_profile.ps1 @@ -12,6 +12,8 @@ $ENV:PATH+=";C:\ProgramData\chocolatey\bin" # Package management is nice. $ENV:PATH+=";C:\Program Files\nodejs" # KataKoda wants to add tools via npm $ENV:PATH+=";C:\PENGUIN" # Flag to ensure my profile kicked in. + + function Start-Vault() { consul agent -dev # Run in Dev Mode vault sever -config c:\src\dotfiles\vaultconfig.hcl -address=http://127.0.0.1:8200 # Use local dev Consul as storage @@ -48,3 +50,13 @@ function Start-DockerJuiceShop() { docker run --rm -p 3000:3000 bkimminich/juice-shop Write-Host "Vulnerable Juice Shop running on 3000" } + +# Import some home grown PowerShell modules, if they are installed. +$modPaths = @("C:\src\toybox\toybox.psm1") +$modPaths | ForEach-Object { + Write-Host $_ + $_ | Format-Table + if(Test-Path -Path $_) { + Import-Module $_ + } +} \ No newline at end of file -- 2.47.3