12 Sharing scripts among a team

 

This chapter covers

  • Using GitHub Gist to share scripts
  • Creating a module to share with a team
  • Using a GitHub repository to store and manage a module

How often have you spent time writing a script to perform a task, only to find out someone else on your team had already done something similar? If you are like me, the answer is more times than you can count. And this problem only continues to grow as things like working from home and bringing your own device become more prevalent. So, in this chapter, we will explore some ways that you can share scripts as a team.

Depending on which source you look at, you will see reports that 20–50% of service desk calls are for repetitive issues. These can be things like password resets, fixing permissions, freeing up disk space, troubleshooting connection issues, or any other number of issues. So, it would only make sense for you to arm your team with tools to resolve these problems quickly, and one of the best ways to do this is by creating a PowerShell module that they can use. In this chapter, you will learn how to use GitHub to share individual scripts and an entire module.

12.1 Sharing a script

12.1.1 Creating a gist

12.1.2 Editing a gist

12.1.3 Sharing a gist

12.1.4 Executing a gist

12.2 Creating a shared module

12.2.1 Uploading the module to a GitHub repository

12.2.2 Giving access to the shared module

12.2.3 Installing the shared module

12.3 Updating a shared module

12.3.1 Make the module self-update

12.3.2 Creating a pull request

12.3.3 Testing the self-update

Summary