Skip to content

Instantly share code, notes, and snippets.

@qbikez
Created February 16, 2016 06:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qbikez/4cc936e51a477fa3aaca to your computer and use it in GitHub Desktop.
Save qbikez/4cc936e51a477fa3aaca to your computer and use it in GitHub Desktop.
a template for creating powershell module
$root = "."
if (![string]::IsNullOrEmpty($PSScriptRoot)) {
$root = $PSScriptRoot
}
#if ($MyInvocation.MyCommand.Definition -ne $null) {
# $root = $MyInvocation.MyCommand.Definition
#}
$helpersPath = $root
# grab functions from files
Resolve-Path $helpersPath\functions\*.ps1 |
? { -not ($_.ProviderPath.Contains(".Tests.")) } |
% { . $_.ProviderPath }
#Export-ModuleMember -Function *
Export-ModuleMember -Function *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment