Skip to content

Instantly share code, notes, and snippets.

@OCram85
Last active December 12, 2016 07:32
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 OCram85/0e0feb3a558df95096938f2dd6ae3ca6 to your computer and use it in GitHub Desktop.
Save OCram85/0e0feb3a558df95096938f2dd6ae3ca6 to your computer and use it in GitHub Desktop.
Posh5 class test with external class definition
Import-Module ClassTest -Verbose -Force
using module ClassTest
$test = [ClassTest]::new()
Class ClassTest {
static [string]$prop1 = "foobar"
static [int]$prop2 = 43
ClassTest() {
}
}
$item = Join-Path -Path $PSScriptRoot -ChildPath 'ClassTest.ps1'
Write-Host $item
. $item
Export-ModuleMember *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment