Skip to content

Instantly share code, notes, and snippets.

@qbikez qbikez/module.psm1
Created Feb 16, 2016

Embed
What would you like to do?
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
You can’t perform that action at this time.