A type accelerator is an alias for a type name. At the beginning of this chapter, the System.Management.Automation.PowerShell type was used. This type has an accelerator available. The accelerator allows the following notation to be used:
[PowerShell].Assembly
Another commonly used example is the ADSI accelerator. This represents the System.DirectoryServices.DirectoryEntry type. This means that the following two commands are equivalent:
[System.DirectoryServices.DirectoryEntry]"WinNT://$env:COMPUTERNAME" [ADSI]"WinNT://$env:COMPUTERNAME"
Getting the list of type accelerators isn't quite as easy as it should be. An instance of the TypeAccelerators type is required first. Once that has been retrieved, a static property called Get will retrieve the list; the first few results are shown as follows:
$type = [PowerShell].Assembly.GetType...