MattHodge / Graphite-PowerShell-Functions

A group of PowerShell functions that allow you to send Windows Performance counters to a Graphite Server, all configurable from a simple XML file.
https://hodgkins.io/using-powershell-to-send-metrics-graphite
GNU General Public License v3.0
217 stars 71 forks source link

PowerShell Module #23

Closed ghostsquad closed 9 years ago

ghostsquad commented 10 years ago

I'd like to see this as a module, that way, private functions are hidden away, and things like

Import-Module SQLPS
Add-PSSnapin SqlServerCmdletSnapin100
Add-PSSnapin SqlServerProviderSnapin100

Can be done when the module is imported, instead of when a function is run.

MattHodge commented 10 years ago

I agree, this should be a module. I will test out making the nssm run a module as a service..

ghostsquad commented 10 years ago

Nssm would still run PowerShell, the first command would be

Import-module graphite-PowerShell

Instead of dot-sourcing the script.

halr9000 commented 9 years ago

This will also you to upload the module to PoallowtorShell Gallery (https://msconfiggallery.cloudapp.net) which will become a very big deal with the release of PowerShell v5 and its PowerShellGet module.

End result: install-module graphite-PowerShell

MattHodge commented 9 years ago

Thanks @halr9000! I have reached out to the email behind the PowerShell Gallery to get the module added.