daily pastebin goal
66%
SHARE
TWEET

Untitled

a guest Feb 13th, 2018 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $script_library = "C:\ps_profile_scripts\" # path ending with \
  2. $env:path += ";C:\Program Files (x86)\Microsoft VS Code"
  3. $modules = "posh-git","psake","pester"
  4.  
  5. # disable terminal bells and beeps
  6. Set-PSReadlineOption -BellStyle None -MaximumHistoryCount 1000
  7.  
  8.  
  9. # load named modules, if they exist, and show a version table
  10. foreach ($module in $modules) {
  11.   if (Get-Module -listavailable -name $module) {
  12.     Import-Module $module
  13.   }  
  14. }
  15. Get-Module $modules | Format-Table name, version
  16.  
  17. # dot-source loose scripts (functions and such)
  18. Get-ChildItem ($script_library + "*.ps1") |
  19.   ForEach-Object { . (Join-Path $script_library $_.Name)}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top