Search notes:

System.Management.Automation.TypeAccelerators (class)

Adding a type accelerator in PowerShell

add-type  -assemblyName Microsoft.VisualBasic

#
# Use the TypeAccelerators class to add a type accelerator to Microsoft.VisualBasic.Information
#
$ta = [powerShell].assembly.getType('System.Management.Automation.TypeAccelerators')
$ta::add('vbi', 'Microsoft.VisualBasic.Information')

#
# Test the type accelerator:
#
$comObj = [System.Runtime.InteropServices.Marshal]::GetActiveObject('Excel.Application')

[vbi]::TypeName($comObj.selection)

See also

Type accelerators in PowerShell

Index