Working with PowerShell, Visual Studio Code and Github for the reluctant IT Pro

Working with PowerShell, Visual Studio Code and Github for the reluctant IT Pro

9768eea42c648fc1dcd190e924deb59c?s=128

Thomas Vochten

December 05, 2019
Tweet

Transcript

  1. 1.
  2. 2.

    Working with PowerShell, Visual Studio Code & Git(Hub) for the

    reluctant IT Pro Thomas Vochten Microsoft MVP, Xylos
  3. 3.

    Agenda • PowerShell past, present & future • Essential PowerShell

    modules & configuration • Working with Visual Studio Code • Getting started with git • Leverage the power of the community
  4. 7.

    Why PowerShell? Many tasks are only available in PowerShell &

    Avoiding repetition should be a life goal
  5. 10.

    PowerShell • The old and trusted • .NET Framework •

    Windows only • powershell.exe • versions 1.0 > 5.1 • continues to be supported PowerShell Core • The new kid on the block • .NET Core • Cross-platform • pwsh.exe • version 6 and beyond • the way forward
  6. 13.

    Have a toolbox! Aim for a modular approach with •

    Reusable tools • Predictable outcome • Single responsibility
  7. 16.

    ✔Check for updated modules Get-InstalledModule | foreach { $b =

    (find-module $_.name).version ; if ($b -ne $_.version) { Write-host "$($_.name) has an update from $($_.version) to $b" } }
  8. 20.
  9. 21.

    Why Visual Studio Code? • Intellisense • Debugging • Script

    Analysis • Built-in git support • Cross-platform • Open source • Highly customizable • Powerful extensions model
  10. 23.

    Basic tweaks & customizations • Install extensions • PowerShell •

    EditorServicesCommandSuite tip • Configure settings such as color scheme • Configure snippets • Add the SharePoint Server “stubs” https://thvo.me/spstubs (Spencer Harbar) • Use a PowerShell profile!
  11. 26.

    Git is a free and open source distributed version control

    system https://git-scm.com (*) Git is not the same as GitHub, you can host git in Azure DevOps or just use it on your machine only…
  12. 28.

    Git integration with Visual Studio Code • Separate download &

    install • Integrated in Visual Studio Code • Supports most basic git commands • Commandline for more advanced scenario’s • Extension supports pull requests
  13. 29.

    Complementing your toolbox Cmder Open source console emulator Git &

    Linux commands integration http://cmder.net Posh-git PowerShell module for git integration in PowerShell Install-module posh-git
  14. 30.

    Git Essentials • Just “downloading” code from the internet (cloning)

    • Creating your own version of existing code (forking) • Creating a separate area to work on stuff (branching) • Checking in your changes (committing) • Move your changes to a remote repository (pushing) • Getting changes from the remote repository (pulling)
  15. 32.

    Want to learn more about git? Start experimenting yourself! 1)

    Create a GitHub account 2) Create a repository to store your work 3) Try the basics https://git-scm.com/doc
  16. 34.

    Sharing is caring! Everyone can contribute • Share the things

    you’re proud of • PowerShell scripts & modules • Samples and tutorials • Documentation • …
  17. 35.

    Contributing with git • Fork the repo you want to

    contribute to • Create a branch for your change • Make & test your changes • Create a pull request • Wait for the pull request to be accepted Learn about pull requests etiquette…
  18. 37.