Guest User

Untitled

a guest
Feb 13th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  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)}
Add Comment
Please, Sign In to add comment