A collection of my PowerShell functions and scripts that I have developed over time. There are functions to help with logging and Text to Speech (FC_Log); my git workflow (FC_Git module); setting up/administering windows PCs (FC_SysAdmin); querying/administering SQL server and generally working with data (Excel/Flat files, ssas, ssis, crystal reports etc. inside of FC_Data); as well as other more fun stuff (render a Blender file, wrappers for GBA emulator, etc. in FC_Misc).
As I primarily use pwsh core nowadays, these modules are designed to be pwsh core compatible.
Use PSGallery to install and update your local modules. I am working towards CI/CD setup for publishing and it still needs some more automation, so there may be some delay in getting the latest versions published, but this is a much better way to install and manage your modules than hacking your $env:PSModulePath
The 2 main modules that you need are:
The other modules are independent of each other.
Clone the repository locally and add the /Modules/ directory into your $env:PSModulePath
via your $PROFILE
. My profile on development machines includes a section like below to use the modules directly from source. If running on Windows, you will need to replace the :
with ;
if (!($env:PSModulePath -Like "*:/home/brandon/git/friendly-chainsaw/Modules/*")){
$env:PSModulePath = $env:PSModulePath + ":/home/brandon/git/friendly-chainsaw/Modules/:"
}
To open an interactive shell:
docker run -it bmcclure89/fc_powershell:main
To mount a directory and run a script in an interactive way:
docker run -v ${PWD}:/work -it bmcclure89/fc_powershell:main pwsh /work/Scripts/Invoke-DockerScriptExample.ps1 "Brandon"
Use make build
and make test
to build the module files and run the tests. This will run some helper docker images (src) to keep the environment consistent.
You can run the tests manually with pester as well!
This is a collection of scripts that I use daily. As such, I don't really have a goal for this code (other than to make my daily life more automated!). If you have an improvement or an idea, open a pull request with your contribution!
This project is licensed under the MIT License unless specified otherwise. I see the LICENSE file for details