diff --git a/input/en-us/features/powershell.md b/input/en-us/features/powershell.md index 5a8a22fc6cc..ede558f31ac 100644 --- a/input/en-us/features/powershell.md +++ b/input/en-us/features/powershell.md @@ -3,8 +3,24 @@ Order: 20 xref: packaging-for-the-masses Title: Packaging for the masses - PowerShell Description: At its heart, Chocolatey uses the Windows Automation Language, PowerShell, to perform its different operations -ShowInNavBar: false -ShowInSideBar: false --- -> :warning: **WARNING** This is a Work in Progress. Please check back later. \ No newline at end of file +Released in November 2006, Windows PowerShell, quickly became the defacto way to automate tasks on Windows. Whether it was automating the creation of Users within Active Directory, or configuring/maintaining your Exchange Server, PowerShell was the way to do it. + +When Chocolatey started, it was clear that PowerShell was going to be at the heart of how it works as well, and that continues to this day. + +Within a Chocolatey package, there are three main PowerShell files: + +- chocolateyInstall.ps1 +- chocolateyUninstall.ps1 +- chocolateyBeforeModify.ps1 + +> :memo: **NOTE** Not all of these files are required within every Chocolatey package, as Chocolatey performs a number of tasks automatically, and overrdiing the dfeault functionality is only required when you want to do something different. + +When a Chocolatey package is installed/uninstalled, these files are executed at [different times](xref:create-packages#during-which-scenarios-will-my-custom-scripts-be-triggered), giving a [package creator](xref:create-your-own-packages) full control over exactly what actions are performed within a package. + +This flexibility allows for the creation of simple packages (that simply execute a native installer) all the way up to highly complicated installations that perform several operations. + +On top of this, Chocolatey ships with a number of [built-in functions](xref:powershell-reference), to help with the specific tasks of installing applications, binaries, zips, and scripts. + +When you need to create your own custom PowerShell functions, Chocolatey provides the ability to create [extension packages](xref:extensions), to allow the sharing of code across multiple packages, rather than duplicating it. \ No newline at end of file