Try something like this:
32# (get-date).GetType().Assembly.GetCustomAttributes([Reflection.AssemblyCopyrightAttribute], $false)
Copyright TypeId
--------- ------
© Microsoft Corporation. All rights reserved. System.Reflection.AssemblyCopyrightAttribute
Instead, get-dateuse the instance from the assembly you are interested in. Also replace the Assembly * attribute you want to get.
AssemblyMetadataAttribute .NET 4.5. PowerShell .NET 4.0. :
$assembly = [Reflection.Assembly]::ReflectionOnlyLoadFrom("$pwd\ClassLibrary1.dll")
[reflection.customattributedata]::GetCustomAttributes($assembly)
:
AttributeType Constructor ConstructorArguments
------------- ----------- --------------------
System.Runtime.Versioning.... Void .ctor(System.String) {".NETFramework,Version=v4...
System.Reflection.Assembly... Void .ctor(System.String) {"ClassLibrary1"}
System.Reflection.Assembly... Void .ctor(System.String) {""}
System.Reflection.Assembly... Void .ctor(System.String) {""}
System.Reflection.Assembly... Void .ctor(System.String) {"CDL/TSO"}
System.Reflection.Assembly... Void .ctor(System.String) {"ClassLibrary1"}
System.Reflection.Assembly... Void .ctor(System.String) {"Copyright © CDL/TSO 2013"}
System.Reflection.Assembly... Void .ctor(System.String) {""}
System.Reflection.Assembly... Void .ctor(System.String, ... {"key1", "value1"}
System.Runtime.InteropServ... Void .ctor(Boolean) {(Boolean)False}
System.Runtime.InteropServ... Void .ctor(System.String) {"945f04e1-dae3-4de6-adf6-...
System.Reflection.Assembly... Void .ctor(System.String) {"1.0.0.0"}
System.Diagnostics.Debugga... Void .ctor(DebuggingModes) {(System.Diagnostics.Debug...
System.Runtime.CompilerSer... Void .ctor(Int32) {(Int32)8}
System.Runtime.CompilerSer... Void .ctor() {}
key1 ane value1 .