2
Overview of NuGet and Powershell modules
Gabe edited this page 2026-07-01 18:14:40 +00:00

What is NuGet?

  • NuGet is officially a Microsoft tool. Its the official package manager for the .NET ecosystem.
  • Nuget is a tool for packaging code into packages for easy sharing and distribution.
  • A NuGet package is a single ZIP file with the .nupkg extension and a descriptive manifest that includes information like the package's version number.
  • Basic use case is to create packages and then publish them to a public or private host.
    https://learn.microsoft.com/en-us/nuget/what-is-nuget

What is a Powershell Module?

Why use it?

  • To allow for an easier way to distribute Powershell code to servers from Gitlab.
  • Using this will allow all the benefits of creating Powershell scripts and functions in Gitlab with an easier method to get said code to your servers.
  • Not only can it be used to get newly created scripts and functions to your servers, but I can be used to keep the code up to date from Gitlab. (NuGet supports versioning, allowing you to manage and distribute different versions of your module).
  • Another benefit of this system is reusing functions across scripts will be easier and maintainable.
  • Distribution will be used through a NuGet repo so all servers will have access and can stay hardened without opening up unnecessary access.

How is it going to be used? (High level overview of the process)

  • Powershell functions will get coded into a Powershell module
  • Manifest file is created for the module with information like author, description, version number.
  • Powershell module (with manifest file) will be packaged in a NuGet package.
  • NuGet package is published to the NuGet repository.
  • Engineers can add the Nuget repo to their servers and pull any module.