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)