Monday, 17 November 2008


Gets assembly full name of a loaded assembly
This script uses reflection to get and assembly, then
gets the assembly's full name
File Name : Get-AssemblyName.ps1
Author : Thomas Lee -
Requires : PowerShell V2 CTP3
PSH [C:\foo]: .\Get-AssemblyName.Ps1'
Full name = "mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089"

# Start of script

# Using Reflection to get information from an Assembly:
$o =[System.Reflection.Assembly]::Load("mscorlib.dll")
$name = $o.GetName()

# Display full name
"Full name = `"{0}`"" -f $name
# End of script

1 comment:

Cindy Dy said...

I am happy to find your distinguished way of writing the post. Now you make it easy for me to understand and implement the concept. Thank you for the post.