Skip to content

Commit

Permalink
#5 New-InMemoryModule works across all versions of .NET now
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Graeber committed Jun 4, 2016
1 parent b774e65 commit b449837
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PSReflect.psm1
Expand Up @@ -37,7 +37,7 @@ $Module = New-InMemoryModule -ModuleName Win32
$ModuleName = [Guid]::NewGuid().ToString()
)

$AppDomain = [Reflection.Assembly].Assembly.GetType('System.AppDomain').GetProperty('CurrentDomain').GetValue($null)
$AppDomain = [Reflection.Assembly].Assembly.GetType('System.AppDomain').GetProperty('CurrentDomain').GetValue($null, @())
$LoadedAssemblies = $AppDomain.GetAssemblies()

foreach ($Assembly in $LoadedAssemblies) {
Expand Down

0 comments on commit b449837

Please sign in to comment.